Skip to main content
Glama

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.
agentNameNoOptional agent/client name shown to design viewers; self-reported.
agentModelNoOptional current model name shown to design viewers; self-reported. Omit when unknown.
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. Changed2 schema fields changed
    • addedInput schema / properties / agentModel
      Added value: +{
      +  "description": "Optional current model name shown to design viewers; self-reported. Omit when unknown.",
      +  "maxLength": 80,
      +  "type": "string"
      +}
    • addedInput schema / properties / agentName
      Added value: +{
      +  "description": "Optional agent/client name shown to design viewers; self-reported.",
      +  "maxLength": 80,
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so richly: it discloses server-side validation against quotas, preservation of server-owned identity/access/creation time, retention of the old revision, whole-snapshot broadcast, and idempotent retry semantics via operationId. It also clarifies that dryRun changes nothing.

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?

Dense but front-loaded: the core replace action and its scope open the description, followed by preconditions, side effects, and the dryRun routing rule. It is long and slightly packed, but nearly every clause conveys actionable constraint rather than filler.

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 an output schema exists (return shape need not be explained), a mutation-style tool with nested document input and 8 params is fully covered: preconditions, side effects, quota validation, retry, and dryRun/elicitation behavior are all present.

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 high (88%), so the baseline is 3, but the description adds real meaning beyond the schema: baseRevision must still be current, document must match the design and canonical home, operationId is the retry key that must be reused, and dryRun validates/returns choices without writing.

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 and resource ('Replace one stored design from a complete DesignDocumentV1 copy') and positions it precisely among siblings as 'the authoritative save-back and re-import operation,' distinguishing it from create/apply/fork/move tools without needing their schemas.

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?

Gives explicit preconditions (document must name the same design and canonical home read from ui_builder_get_design; baseRevision must still be current) and an explicit routing rule: unless the person already chose to save back, call first with dryRun: true, describing both the elicitation and non-elicitation paths. It also names the exact retry condition and warns against inventing a new operationId.

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.