Skip to main content
Glama

ui_builder_restore_revision

Destructive

Make a retained revision the design's current content again, forward: it is committed as a new revision and nothing after it is lost, so a restore is undone by restoring again. baseRevision must be the current revision (a restore that raced an edit is refused as stale). dryRun: true writes nothing and returns the diff the restore would apply. Needs write access to the design.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "designId": "<designId>",
      "revision": "<revision>",
      "baseRevision": "<baseRevision>"
    },
    "name": "ui_builder_restore_revision"
  }
}

Input 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.
dryRunNoReturn the diff without restoring. Defaults to false.
designIdYes
revisionYesThe retained revision to restore.
agentNameNoOptional agent/client name shown to design viewers; self-reported.
agentModelNoOptional current model name shown to design viewers; self-reported. Omit when unknown.
operationIdNoMakes a retry idempotent. Defaults to a fresh id.
baseRevisionYesThe design's current revision, from ui_builder_get_design or ui_builder_list_revisions.

Output Schema

NameRequiredDescriptionDefault
diffYes
staleYes
dryRunYes
schemaYes
appliedYes
summaryYes
designIdYes
revisionYes
operationIdNo
baseRevisionYes
documentDigestNo
currentRevisionYes
committedRevisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. 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"
      +}
  4. Added

TDQS

A4.3/5.0
Behavior5/5

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

Substantially exceeds the annotations: it explains that despite being a write, nothing after the target revision is lost and the operation is undone by restoring again, discloses the concurrency guard (stale refusal) and the write-access requirement. This is exactly the context an agent needs before invoking a destructiveHint:true tool.

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-loaded with the core action and its forward-commit model, then preconditions, then dryRun, then access. Dense but every clause carries information; the long second sentence is justified by the stale-restore rule it encodes.

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?

For an 8-parameter mutating tool with an output schema, the description covers the model of the operation, the safety precondition, the dry-run mode, and the access requirement. Nothing an agent needs in order to call this 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 88%, so the baseline is 3, but the description adds real semantics the schema does not: baseRevision is what makes a restore safe against races, and dryRun returns the diff rather than a no-op. It does not restate token/operationId, which the schema already handles well.

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

Purpose4/5

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

States a specific verb+resource: makes a retained revision the design's current content, and adds a precise model of what that means (committed forward as a new revision). It does not name or contrast with the sibling ui_builder_restore_design, which is the most likely confusion point given the near-identical name, so sibling differentiation is only implied.

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?

Gives clear conditions for correct use: baseRevision must equal the current revision, a raced restore is refused as stale, and dryRun previews the diff without writing. It does not explicitly say when to pick this over restore_design or how to recover from a stale refusal beyond the caller's inference.

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.