Build a launch announcement with a header image and gallery
components_v2_send is an ordinary write and is not confirmation-gated, it validates locally then posts immediately. Components V2 is irreversible for that message, it can never become a plain-content message afterward.
Step 1: build a section with its required accessory#
text takes one to three Markdown strings; a Section always needs a Thumbnail or Button accessory, Discord rejects a Section without one.
{
"name": "components_v2_build_section",
"arguments": {
"text": ["# discord-mcp release", "A typed Discord toolset for MCP clients."],
"accessory": { "type": 11, "media": { "url": "https://example.com/hero.png" }, "description": "Release artwork" }
}
}Step 2: build the media gallery#
Builder inputs use a top-level url, the builder converts it to Discord's nested media.url output shape.
{
"name": "components_v2_build_media_gallery",
"arguments": {
"items": [
{ "url": "https://example.com/tool-catalog.png", "description": "Tool catalog" },
{ "url": "https://example.com/telemetry.png", "description": "Telemetry view" }
]
}
}Step 3: wrap both in a container#
Pass each builder's component value, not the wrapper object, into the container's components array along with an accent_color. The result is { "component": { "type": 17, ... } }.
Step 4: validate before sending#
{ "name": "components_v2_validate", "arguments": { "components": [ /* the container from step 3 */ ] } }Success is exactly { "valid": true, "issues": [] }.
Step 5: send the validated array#
Use the exact validated components array and add the target channel_id. The result contains message_id, channel_id, jump_url, and component_count: 1.
Why the builder sequence matters#
- Each builder is read-only and safe to rerun.
- Wrapper objects are never valid component nodes, always pass their
componentvalue. - Offline validation returns precise issue paths without consuming a Discord request.
- The final send automatically sets the Components V2 message flag.
Related tools#
components_v2_send full schema, and the Components V2 category for the other seven builder and utility tools.
Next steps#
Send the same rich layout through a webhook instead of your bot: publish as a webhook. Back to the overview.