components_v2_preview
Render a Components V2 layout as ASCII so the agent can sanity-check structure without sending. Pairs with components_v2_validate for offline iteration.
MCP call example
Section titled “MCP call example”{ "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" ]}Returns
Section titled “Returns”{ascii} - multi-line string visualizing the layout.
Example structured result
Section titled “Example structured result”{ "ascii": "example"}Output schema
Section titled “Output schema”| 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}Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | yes |
| Destructive | no |
| Idempotent | yes |
| Open-world | no |
| Confirmation required | no |
Access and common errors
Section titled “Access and common errors”- The
components_v2category must be enabled byMCP_CATEGORIESwhen an allowlist is set. - This tool is local-only and does not call Discord. Schema or domain validation can still reject malformed input.
Source
Section titled “Source”packages/mcp-core/src/tools/components-v2/preview-tool.ts