Skip to main content
Glama

ui_builder_pick_branch

Destructive

Ask the person which alternative (open branch) of a design to keep, and return their choice. In ChatGPT or Codex it is a thumbnail picker, one option per branch; with plain form elicitation it is a single-choice form; otherwise — and in chat tools like Slack — it returns a numbered list and one picture for YOU to post, and the person replies with a number. It never waits on a client that cannot answer. outcome is chosen (with branchId), declined, ask-in-chat or no-branches. Writes nothing: merge the chosen branch with ui_builder_merge_branch (dryRun first). 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_pick_branch"
  }
}

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.
inlineNoWith a numbered list, also return its picture as an image block.
messageNoThe question to put to the person. Defaults to asking which alternative to keep.
designIdYesThe parent design.
agentNameNoOptional agent/client name shown to design viewers; self-reported.
branchIdsNoOnly these open branches, 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
viaNo
imageNo
schemaYes
optionsNo
outcomeYes
summaryYes
branchIdNo
designIdYes
imageBase64No

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

A3.5/5.0
Behavior1/5

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

The description asserts 'Writes nothing' and 'Read access to the design,' while the annotations declare readOnlyHint=false and destructiveHint=true. That is a direct contradiction about whether the call mutates state. Otherwise the text does disclose useful behavior ('never waits on a client that cannot answer'), but the safety profile conflict dominates.

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, then the client-specific behaviors, then the outcome values and the follow-up merge. Semantically dense and mostly free of filler, though the em-dash-heavy client-fallback sentence is harder to parse than it needs to be.

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?

An output schema exists, yet the description still usefully names the `outcome` values (chosen/declined/ask-in-chat/no-branches), which tells an agent how to branch its own next step. Combined with the fallback-mode coverage, little is missing except an accurate statement of side effects.

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 description coverage is 100%, so every parameter is already documented in the schema. The description adds only indirect hints (the numbered-list picture corresponds to the `inline` flag) and does not clarify `token`, `agentName`/`agentModel`, or `branchIds` ordering beyond what the schema says. Baseline 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 resource — ask the person which open branch of a design to keep and return their choice — and names the value it yields. It is immediately distinguishable from siblings like ui_builder_list_branches or ui_builder_merge_branch.

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?

Explains the runtime situations it adapts to (thumbnail picker, single-choice form, numbered list for Slack-style chat) and explicitly routes the follow-up write to ui_builder_merge_branch with dryRun first. It lacks an explicit 'do not call this when…' exclusion, but the sequencing guidance is concrete.

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.