Skip to content

components_v2_build_container

Category: components_v2

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.

FieldTypeRequiredDescription
componentsarrayyesUp to 10 child nodes (Section/TextDisplay/MediaGallery/File/Separator/ActionRow). NOT another Container.
accent_colorintegernoHex RGB integer (0xFF0000 = red)
spoilerbooleannoWrap container in spoiler tag

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

FieldTypeRequiredDescription
componentunknownyes
PropertyValue
Read-onlyyes
Destructiveno
Idempotentyes
Open-worldno
Confirmation requiredno

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