Skip to main content
Glama

ui_builder_compare_branches

Read-only

Put a design's alternatives side by side in one call: the parent's head and each open branch (or the branchIds named) rendered into ONE picture — a short-lived signed https link, numbered by caption — plus, per branch, what it changes against the parent at its fork (counts and a few lines, as ui_builder_diff_designs reports them). Show the person the picture and the numbered list, then ask with ui_builder_pick_branch; merge the choice with ui_builder_merge_branch. Writes nothing. Read 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>"
    },
    "name": "ui_builder_compare_branches"
  }
}

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.
deviceNoRender every picture at this device instead of each design's own size: a preset id (phone_small, phone, phone_landscape, foldable_folded, foldable_unfolded, tablet_portrait, tablet_landscape, wear_small_round, wear_large_round, wear_square, tv_1080p, widget_small_round, widget_small_squircle, widget_small_rectangular, widget_large_round, widget_large_squircle, widget_large_rectangular) or {"widthDp","heightDp"}. Nothing is saved.
inlineNoAlso return the picture as an image block. Defaults to false: the signed link.
designIdYesThe parent design.
agentNameNoOptional agent/client name shown to design viewers; self-reported.
branchIdsNoOnly these branches of the design, in this order. Defaults to every open branch, oldest first.
agentModelNoOptional current model name shown to design viewers; self-reported. Omit when unknown.

Output Schema

NameRequiredDescriptionDefault
rowsNo
imageNo
deviceNo
parentNo
schemaYes
columnsNo
summaryYes
branchesNo
designIdYes
imageBase64No
parentRevisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed1 schema field changed
    • changedInput schema / properties / device / description
      Previous value: -"Render every picture at this device instead of each design's own size: a preset id (phone_small, phone, phone_landscape, foldable_folded, foldable_unfolded, tablet_portrait, tablet_landscape, wear_small_round, wear_large_round, wear_square, tv_1080p) or {\"widthDp\",\"heightDp\"}. Nothing is saved."New value: +"Render every picture at this device instead of each design's own size: a preset id (phone_small, phone, phone_landscape, foldable_folded, foldable_unfolded, tablet_portrait, tablet_landscape, wear_small_round, wear_large_round, wear_square, tv_1080p, widget_small_round, widget_small_squircle, widget_small_rectangular, widget_large_round, widget_large_squircle, widget_large_rectangular) or {\"widthDp\",\"heightDp\"}. Nothing is saved."
  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. Added

TDQS

A4.3/5.0
Behavior4/5

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

readOnlyHint=true already declares the safety profile, and the description reinforces it non-contradictorily ('Writes nothing. Read access to the design.') while adding genuinely new behavior: the returned link is short-lived and signed, captions are numbered, and device overrides save nothing. It does not discuss cost of rendering many branches or failure modes, so it stops short of a 5.

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 action and output in the first clause, with the workflow routing immediately after — nothing extraneous. It is dense with nested parentheticals, though each one carries real information, so it reads as packed rather than wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description needn't enumerate return fields, and it still characterizes the headline artifact (signed link, numbered captions, per-branch diff counts) and the downstream steps. Somewhat complete for a 7-parameter read tool; minor gaps around large-branch-set behavior and link expiry length.

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 100%, so the schema already explains token, device, inline, branchIds, and the agent metadata fields. The description adds only the default branch selection semantics ('each open branch') and the ordering intent, which the schema also states. Baseline 3 is appropriate.

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 concrete verb and resource — renders the parent head plus each open branch (or named branchIds) into ONE composite picture with per-branch change summaries — and explicitly distinguishes its output from ui_builder_diff_designs, which only reports the diff data. An agent can tell this apart from the pure-diff sibling without opening either 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?

Gives an explicit follow-on workflow: show the person the picture and numbered list, ask the choice with ui_builder_pick_branch, then merge with ui_builder_merge_branch. It also carves out its role relative to ui_builder_diff_designs, leaving no inference about when to reach for this versus the plain diff tool.

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.