ui_builder_validate
Check a design without saving it: a whole document, a stored design by designId, or operations against a stored design exactly as ui_builder_apply would apply them. Runs the same checks the real call does — document shape, catalog pin, the catalog's own validation, the mutation reducer — and then the Compose export gate, which is the list the editor's problems panel shows. Returns {valid, problems:[{severity, source, code, message, nodeId?, field?, operationIndex?}]}; valid is false exactly when a problem is an error. Nothing is written, no revision moves and nobody watching the design is notified. The shapes are published as the resources compose-preview://schemas/ui-builder-document-v1.json and compose-preview://schemas/design-mutation-v1.json.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | No | A grant token from poll_access, when you cannot set the X-Compose-Preview-Token header yourself — an MCP client fixes its headers at connect time, so this is how a token approved during this session is used in it. Prefer the header where you control it. | |
| designId | No | A stored design to check, or to check `operations` against. | |
| document | No | A whole DesignDocumentV1 to check. | |
| operations | No | DesignMutationV1 objects to check against `designId`'s current document, as ui_builder_apply takes them. | |
| baseRevision | No | The revision the operations were written against; a stale one is reported as a warning. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | ||
| schema | Yes | ||
| designId | No | ||
| problems | Yes | ||
| revision | No |