components_v2_build_media_gallery
Build a Components V2 MediaGallery (type 12) - 1-10 media items.
MCP call example
Section titled “MCP call example”{ "name": "components_v2_build_media_gallery", "arguments": { "items": [ { "url": "https://example.com/resource" } ] }}| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
items | array<object> | yes | min items: 1; max items: 10 | 1-10 media items |
Complete input JSON Schema
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "minItems": 1, "maxItems": 10, "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string", "format": "uri" }, "description": { "type": "string", "maxLength": 1024 }, "spoiler": { "type": "boolean" } }, "required": [ "url" ] }, "description": "1-10 media items" } }, "required": [ "items" ]}Returns
Section titled “Returns”{component} - MediaGallery JSON node.
Example structured result
Section titled “Example structured result”{ "component": { "type": 12, "items": [ { "media": { "url": "https://example.com/image.png" } } ] }}Output schema
Section titled “Output schema”| 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}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/build_media_gallery.ts