Skip to content

components_v2_preview

Components v2 Read only

Render a Components V2 layout as ASCII so the agent can sanity-check structure without sending. Pairs with components_v2_validate for offline iteration.

{
"name": "components_v2_preview",
"arguments": {
"components": [
{
"type": 10,
"content": "Hello from discord-mcp"
}
]
}
}
Field Type Required Constraints Description
components array<unknown> yes Components array to render
Complete input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"components": {
"type": "array",
"items": {},
"description": "Components array to render"
}
},
"required": [
"components"
]
}

{ascii} - multi-line string visualizing the layout.

{
"ascii": "example"
}
Field Type Required Constraints Description
ascii string yes
Complete output JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ascii": {
"type": "string"
}
},
"required": [
"ascii"
],
"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/preview-tool.ts