Skip to main content
Glama

ui_builder_preview_catalog_recovery

Read-only

Dry-run recovery of a design whose stored catalog pin no longer resolves (catalogUnavailable from ui_builder_get_design). The server selects the exact currently served pin for the same catalog system and returns a CatalogUpgradePreviewV1: status (ready or blocked), changes, issues, and the hashes the move is checked against. This call never writes. When status is ready the reply also carries apply: the complete arguments for ui_builder_apply — send that object as they are and the design moves onto the served pin, recorded as a new revision. Assembled by hand it is operations: [{"type":"upgradeCatalog", sourceCatalogPin, targetCatalogPin, sourceDocumentHash, targetDocumentHash, previewDigest}] with baseRevision set to the preview's baseRevision, where targetDocumentHash is the preview's candidateDocumentHash and the other four are copied by name. A blocked preview has no apply: its error-severity issues say what the served catalog no longer accepts. The candidate document itself is omitted, since it is the whole design again; includeCandidate: true returns it.

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>"
    },
    "name": "ui_builder_preview_catalog_recovery"
  }
}

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.
designIdYes
agentNameNoOptional agent/client name shown to design viewers; self-reported.
agentModelNoOptional current model name shown to design viewers; self-reported. Omit when unknown.
includeCandidateNoReturn `preview.candidateDocument`, the whole design as it would be on the served pin. Defaults to false.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed1 schema field changed
    • addedInput schema / properties / includeCandidate
      Added value: +{
      +  "description": "Return `preview.candidateDocument`, the whole design as it would be on the served pin. Defaults to false.",
      +  "type": "boolean"
      +}
  4. 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"
      +}
  5. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "type": "object"
      +}
  6. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description reinforces it with 'This call never writes', then goes further by describing the preview payload, the absent `apply` on blocked results, and that the candidate document is omitted unless requested. It stops short of covering the `token`/`agentName`/`agentModel` side effects, but the behavioral core is well disclosed.

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 trigger and the no-write guarantee, then the return shape. Some density is spent restating the hand-assembled `operations` array, which is useful fallback detail but lengthens the block; the sentences are long but each carries information.

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 a preview-then-apply recovery flow the description covers the trigger, the return fields, the apply bridge, and the blocked path. With an output schema present, it doesn't need to enumerate return values further, and nothing essential for a correct call is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 80%, so most parameters are already documented. The description adds only the rationale for `includeCandidate` (the candidate is the whole design again) and says nothing about `token`, `agentName`, or `agentModel`, so the baseline of 3 applies.

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 object (dry-run recovery of a design) plus the exact triggering condition (`catalogUnavailable` from ui_builder_get_design). It explicitly separates itself from the writing sibling by noting 'This call never writes' and by handing off to ui_builder_apply.

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 the precise entry condition (a stored catalog pin that no longer resolves), the branch on `status` (`ready` → send the returned `apply` verbatim; `blocked` → read the error-severity `issues`), and names the follow-up tool. No inference is left to the agent.

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.