Skip to main content
Glama

Compose Preview Catalogs

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

TableJSON Schema
NameRequiredDescriptionDefault
tokenNoA 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.
designIdNoA stored design to check, or to check `operations` against.
documentNoA whole DesignDocumentV1 to check.
operationsNoDesignMutationV1 objects to check against `designId`'s current document, as ui_builder_apply takes them.
baseRevisionNoThe revision the operations were written against; a stale one is reported as a warning.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validYes
schemaYes
designIdNo
problemsYes
revisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and does so: it enumerates the check pipeline (document shape, catalog pin, catalog validation, mutation reducer, Compose export gate), states the exact return contract and the meaning of `valid`, and explicitly declares no side effects ('nothing is written, no revision moves and nobody watching the design is notified').

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core verb is front-loaded, and the description is dense but filler-free: each clause (return shape, side-effect guarantees, schema resource pointers) delivers information an agent needs for a 5-parameter tool with three input modes. Length is proportionate to the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Annotations are absent and the description compensates fully; the output schema exists yet the description still names the key response fields and the valid semantics, and it points to both schema resources for the document/mutation shapes. Nothing needed to invoke this correctly, or to interpret its result, is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so baseline is 3, but the description adds relational semantics the schema does not: `operations` are checked against `designId`'s current document and `baseRevision` staleness surfaces as a warning rather than a failure. That meaningfully clarifies how the parameters interact, rather than restating field definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Check a design without saving it') and enumerates the three accepted input shapes (document, designId, operations). It explicitly positions itself against ui_builder_apply ('exactly as ui_builder_apply would apply them'), so an agent can distinguish it from the real mutation call and from ui_builder_get_design without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The dry-run framing makes the use case clear: run this before the real apply to see the same checks. It names ui_builder_apply as the counterpart operation, which implies the when-to-use/when-not split. It stops short of an explicit 'use validate instead of apply when you are not ready to commit' instruction or listing other alternatives, so it is clear context rather than a full routing rule.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.