components_v2_validate
Validate Discord Components V2 arrays offline before sending. Enforces caps, placement, nesting, button styles, unique IDs, and accessory rules to prevent API errors.
Instructions
Purpose: Validate a Components V2 components array OFFLINE (no Discord API call). Enforces the 40-cap, placement and nesting rules, ActionRow cardinality, Button style contracts, unique custom_id values, accessory requirements, and MediaGallery range. File components are rejected because the current send/edit tools do not upload attachments.
When to use: iterate on a layout before sending. Saves round-trips for agents constructing complex cards.
Returns: {valid, issues:[{path, code, message, fix_hint?}]}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| components | Yes | Components array (will be validated) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||