Skip to content

components_v2_build_section

Components v2 Read only

Build a Components V2 Section (type 9) - 1-3 TextDisplay lines plus a REQUIRED Thumbnail or Button accessory (Discord rejects a Section without one).

card-like content with header + supporting text + image.

{
"name": "components_v2_build_section",
"arguments": {
"text": [
"Hello from discord-mcp"
],
"accessory": {
"type": 11,
"media": {
"url": "https://example.com/resource"
}
}
}
}
FieldTypeRequiredConstraintsDescription
textarray<string>yesmin items: 1; max items: 31-3 markdown text lines
accessoryobject | object | object | objectyesRequired Thumbnail (type 11) or Button (type 2)
Complete input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"text": {
"minItems": 1,
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 4000
},
"description": "1-3 markdown text lines"
},
"accessory": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "number",
"const": 11
},
"media": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
}
},
"required": [
"url"
]
},
"description": {
"type": "string",
"maxLength": 1024
},
"spoiler": {
"type": "boolean"
}
},
"required": [
"type",
"media"
]
},
{
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "number",
"const": 2
},
"label": {
"type": "string",
"maxLength": 80
},
"emoji": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"animated": {
"type": "boolean"
}
}
},
"disabled": {
"type": "boolean"
},
"style": {
"anyOf": [
{
"type": "number",
"const": 1
},
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
},
{
"type": "number",
"const": 4
}
]
},
"custom_id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"url": {
"not": {}
},
"sku_id": {
"not": {}
}
},
"required": [
"type",
"style",
"custom_id"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "number",
"const": 2
},
"label": {
"type": "string",
"maxLength": 80
},
"emoji": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"animated": {
"type": "boolean"
}
}
},
"disabled": {
"type": "boolean"
},
"style": {
"type": "number",
"const": 5
},
"url": {
"type": "string",
"format": "uri"
},
"custom_id": {
"not": {}
},
"sku_id": {
"not": {}
}
},
"required": [
"type",
"style",
"url"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "number",
"const": 2
},
"style": {
"type": "number",
"const": 6
},
"sku_id": {
"type": "string",
"pattern": "^\\d{17,20}$"
},
"disabled": {
"type": "boolean"
},
"label": {
"not": {}
},
"emoji": {
"not": {}
},
"custom_id": {
"not": {}
},
"url": {
"not": {}
}
},
"required": [
"type",
"style",
"sku_id"
]
}
]
}
],
"description": "Required Thumbnail (type 11) or Button (type 2)"
}
},
"required": [
"text",
"accessory"
]
}

{component} - Section JSON node.

{
"component": {
"type": 9,
"components": [
{
"type": 10,
"content": "Hello from discord-mcp"
}
],
"accessory": {
"type": 11,
"media": {
"url": "https://example.com/image.png"
}
}
}
}
FieldTypeRequiredConstraintsDescription
componentunknownyes
Complete output JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"component": {}
},
"required": [
"component"
],
"additionalProperties": false
}
PropertyValue
Read-onlyyes
Destructiveno
Idempotentyes
Open-worldno
Confirmation requiredno
  • The components_v2 category must be enabled by MCP_CATEGORIES when an allowlist is set.
  • This tool is local-only and does not call Discord. Schema or domain validation can still reject malformed input.

packages/mcp-core/src/tools/components-v2/build_section.ts