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"
}
]
}
}
Field Type Required Constraints Description
components array<unknown> yes min items: 1; max items: 10 Up to 10 child nodes (Section/TextDisplay/MediaGallery/File/Separator/ActionRow). NOT another Container.
accent_color integer no min: 0; max: 16777215 Hex RGB integer (0xFF0000 = red)
spoiler boolean no Wrap 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"
}
]
}
}
Field Type Required Constraints Description
component unknown yes
Complete output JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"component": {}
},
"required": [
"component"
],
"additionalProperties": false
}
Property Value
Read-only yes
Destructive no
Idempotent yes
Open-world no
Confirmation required no
  • The components_v2 category must be enabled by MCP_CATEGORIES when an allowlist is set.
  • Access contract: scope=local; this tool uses no Discord credential (local or external operation) and is scoped to the local compiler/validator only.
  • No named Discord permission bit is asserted by this contract.
  • Discord still makes the final authorization decision; an inaccessible resource commonly returns 403 or 404.

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