Skip to main content
Glama

Compose Preview Catalogs

ui_builder_apply

Apply design mutations — insertNode, setProperty, deleteNode, moveNode and the rest of DesignMutationV1 — as one operation. baseRevision is the revision you read; the outcome reports conflicts or rejected edits. This is how an agent adds a scaffold, fills its slots and sets modifiers. Use setStateVariable with name and declaration to add or edit state, removeStateVariable with name to remove unused state, and setEventBinding with nodeId, event and an ordered actions array to edit behavior. An empty actions array removes the event handler. removeNodeProperty (or a setProperty whose value is {"type":"null"}) unsets the property — the way back after trying one — and is refused, naming the node and the field, when the catalog requires it. When somebody has commented on the design and you have not acknowledged it, the outcome carries a comments block naming the threads waiting on you; read it, because it is somebody talking about what you are editing.

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.
clientIdNo
designIdYes
operationsYesDesignMutationV1 objects. State example: {"type":"setStateVariable","name":"expanded","declaration":{"type":"value","valueType":"bool","initialValue":false,"nullable":false,"persistence":"preview"}}. Event example: {"type":"setEventBinding","nodeId":"button","event":"click","actions":[{"type":"toggle","variable":"expanded"}]}. Declare state before binding it in the batch.
operationIdYesYour id for this operation; makes a retry idempotent.
baseRevisionYesThe revision these mutations were written against.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and largely meets it: it discloses that outcomes report conflicts or rejected edits, that removeNodeProperty is refused when the catalog requires the field (naming node and field), that an empty actions array unsets behavior, and that unacknowledged comments surface in a comments block. It still doesn't cover the token/permission model or atomicity/batch-failure semantics in the prose.

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

Conciseness4/5

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

The purpose and baseRevision/conflict model are front-loaded in the first two sentences, and each following sentence covers a distinct operation family. It is dense and slightly run-on, but no sentence is redundant filler, so it earns its length without being wasteful.

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?

This is a complex, no-annotation, mutation tool, yet the description covers the operation taxonomy, revision-conflict behavior, unset/refusal rules, and the comment-acknowledgement loop. With an output schema present, return-value details need not be spelled out, so nothing critical an agent needs to call it correctly 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 67%, and the description adds real meaning beyond it: baseRevision is framed as 'the revision you read', operationId's idempotency is echoed from the schema, and the operations array is illustrated with semantically explained patterns (name/declaration, nodeId/event/ordered actions). Only token/clientId semantics rely entirely on the schema text rather than the description.

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?

The description states a specific verb and resource — applying DesignMutationV1 edits as one operation — and enumerates the concrete mutation types (insertNode, setProperty, deleteNode, moveNode, setStateVariable, setEventBinding). An agent can distinguish this mutation entry point from siblings like ui_builder_validate, ui_builder_replace_design_document and ui_builder_get_design without opening any 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?

It gives clear context for when to reach for each operation family (adding a scaffold, filling slots, setting modifiers, editing state or event behavior) and attaches conditions such as 'declare state before binding it in the batch' and 'empty actions array removes the handler'. It stops short of explicitly naming an alternative sibling or stating when not to use this tool, so it is strong context rather than a full routing guide.

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.