Skip to main content
Glama

ui_builder_restore_revision

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.

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.
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

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

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. Added

TDQS

A4.7/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 burden and does so well: it explains forward-commit semantics (nothing after the revision is lost, a restore is undone by restoring again), the stale-race refusal, that dryRun writes nothing, and the required write access. This is meaningful behavioral disclosure well beyond 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.

Conciseness5/5

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

Three dense sentences that are front-loaded with the core semantic (forward restore) before the guard condition and dryRun note. No filler, and bolding highlights the key terms.

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?

An output schema exists, so return values need not be spelled out, yet the description still notes dryRun returns the diff. For a mutation with eight parameters, the description supplies the mutation semantics, staleness rule, auth need, and preview path — enough for an agent to call it correctly.

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 88%, so the baseline is 3, but the description adds real meaning: baseRevision must be the current revision and a stale value is refused, and dryRun's no-write/diff-returning behavior. It still does not clarify the revision integer's relationship to baseRevision ordering beyond the staleness rule.

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 (restore) and resource (retained revision) plus the resulting state change: the revision becomes the design's current content. Readily distinguishable from siblings like ui_builder_list_revisions or ui_builder_get_design, which are read-only lookups.

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 operating context: baseRevision must be the current revision, and dryRun: true is the way to inspect the change first. It names where to get baseRevision (ui_builder_get_design / ui_builder_list_revisions) but does not explicitly state when NOT to use this versus alternatives such as replace_design_document.

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.