Skip to content

components_v2_build_container

Components v2 Read only

Build a Components V2 Container (type 17) JSON node ready to nest into components_v2_send.

compose a card with accent color + multiple sections/separators.

{
"name": "components_v2_build_container",
"arguments": {
"components": [
{
"type": 10,
"content": "Hello from discord-mcp"
}
]
}
}
FieldTypeRequiredConstraintsDescription
componentsarray<unknown>yesmin items: 1; max items: 10Up to 10 child nodes (Section/TextDisplay/MediaGallery/File/Separator/ActionRow). NOT another Container.
accent_colorintegernomin: 0; max: 16777215Hex RGB integer (0xFF0000 = red)
spoilerbooleannoWrap container in spoiler tag
Complete input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"components": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {},
"description": "Up to 10 child nodes (Section/TextDisplay/MediaGallery/File/Separator/ActionRow). NOT another Container."
},
"accent_color": {
"description": "Hex RGB integer (0xFF0000 = red)",
"type": "integer",
"minimum": 0,
"maximum": 16777215
},
"spoiler": {
"description": "Wrap container in spoiler tag",
"type": "boolean"
}
},
"required": [
"components"
]
}

{component} - the JSON node. Pass it inside the components array of components_v2_send.

{
"component": {
"type": 17,
"components": [
{
"type": 10,
"content": "Hello from discord-mcp"
}
]
}
}
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_container.ts