Skip to main content
Glama

Compose Preview Catalogs

ui_builder_replace_design_document

Replace one stored design from a complete DesignDocumentV1 copy — the authoritative save-back and re-import operation. The document must name the same design and the same canonical home you read from ui_builder_get_design; baseRevision must still be current. The runtime validates the complete document and quotas, preserves server-owned identity, access and creation time, retains the old revision, and broadcasts a whole snapshot. Retry with the same operationId; never invent a new id after a lost response. Unless the person already chose to save back or re-import onto this home, call first with dryRun: true: it changes nothing and returns the choices to put to them — or, when your client supports form elicitation on this connection, asks them in a form and returns the outcome of the write they chose.

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.
dryRunNoValidate and return the person's choices without changing anything.
designIdYes
documentYesThe complete replacement DesignDocumentV1, including the existing home.
operationIdYesYour stable id; makes a retry idempotent.
baseRevisionYesThe exact current revision being replaced.

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.6/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 does so well: it discloses runtime validation of document and quotas, preservation of server-owned identity/access/creation time, retention of the old revision, whole-snapshot broadcast, and idempotent retry via operationId ('never invent a new id after a lost response'). It omits explicit auth/permission requirements, but token handling is covered in the schema.

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?

Front-loads the core operation and its identity/versioning constraints before the dryRun guidance. It is a dense but justified paragraph; a couple of sentences are long, keeping it just short of maximum conciseness.

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?

Given a nested document param, 6 params, and an existing output schema, the definition covers what an agent needs: version-currency, idempotency, validation side effects, idempotent retry, and the dryRun/elicitation fallback. Return values are handled by the output schema, so nothing critical 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 83% (baseline 3), and the description adds real meaning beyond it: it states baseRevision 'must still be current', clarifies operationId retry semantics, and explains dryRun's no-op validation and elicitation behavior. This meaningfully enriches the parameters rather than restating them.

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 ('Replace one stored design from a complete DesignDocumentV1 copy') and frames the scope ('the authoritative save-back and re-import operation'), distinguishing it from get_design, validate, and apply. An agent can identify which sibling performs write-back without reading another schema.

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

Usage Guidelines5/5

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

Explicitly routes usage: read from ui_builder_get_design first, and unless the user already chose to save back/re-import onto this home, call with dryRun:true first. It also specifies the elicitation fallback, giving clear when/when-not guidance against alternatives like apply or validate.

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.