Validate AI Canvas component usage in a file
validate_usageValidates JSX against AI Canvas component prop definitions, flagging unknown props, missing required props, and invalid option strings with line numbers.
Instructions
Check a file's JSX against the documented props of the AI Canvas components it imports. Reports props that do not exist on the component, required props that are missing, and string values outside a prop's allowed options, each with a line number. Run it on every file that uses AI Canvas components before you finish. Components are matched by import path (components/aicanvas/ for standalones, components/aicanvas//... for design-system components); pass tags to map a tag to a slug by hand.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "validate_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The full contents of the file to check. | |
| path | No | The file path, used only in the report. | |
| tags | No | Optional map from JSX tag name to registry slug, e.g. { "Button": "andromeda-button-system" }, for tags the import scan cannot resolve. |