Skip to main content
Glama

ui_builder_view

See a design the way a person in the editor sees it: a PNG of the canvas with the overlays drawn on — the selection outline, the reference picture when one is attached, the discussion's comments pins, and the layout bounds — and beside it JSON with the revision, each visible node's id and box, each pin's thread and position, all in the returned image's pixels. The picture is a short-lived signed https link by default; inline: true puts the bytes in the reply as well. The frame is the PNG export (renderer: "export", the editor's own renderer), which reports no node boxes; renderer: "native" draws real Compose on a host with a native render lane, reports every node's box so the selection can be outlined, and needs the ui-builder-export capability. With no renderer, a non-empty selection is drawn on the native frame when the host has a lane and the caller the capability, and otherwise on the export with a note saying why it is not outlined. A node with no box is reported in notes, never drawn at a guessed position. Not an McpResponseEnvelopeV1.

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.
inlineNoAlso return the PNG as an image block. Defaults to false; a host with no public origin always does.
includeNoOverlays to draw. Defaults to comments, reference, selection; [] draws the bare frame.
designIdYes
rendererNoDefaults to export, or native when a selection is to be outlined and this host and grant can render it.
revisionNoA past revision. Omit for the current one.
viewportNoFit the picture inside this many pixels, keeping its aspect ratio. Omit for the render's own size.
agentNameNoOptional agent/client name shown to design viewers; self-reported.
selectionNoNode ids to show as selected.
agentModelNoOptional current model name shown to design viewers; self-reported. Omit when unknown.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
frameYes
imageYes
nodesNo
notesNo
schemaYes
includeYes
commentsNo
designIdYes
rendererYes
revisionYes
referenceNo
selectionYes
imageBase64No
boundsUnavailableNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / renderer / description
      Previous value: -"Defaults to export."New value: +"Defaults to export, or native when a selection is to be outlined and this host and grant can render it."
  2. 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"
      +}
  3. Added

TDQS

A4.1/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 discloses the default short-lived signed https link vs `inline: true` returning bytes, the renderer/capability dependency (native needs the ui-builder-export capability), the fallback-and-note behavior when a selection cannot be outlined, that boxless nodes go to `notes` rather than a guessed position, and that the result is not an McpResponseEnvelopeV1.

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?

The core purpose is front-loaded in the first clause, and each subsequent sentence covers a distinct behavior (renderer defaults, capability, notes, response envelope). It is dense and clause-heavy with some run-on sentences, but virtually every clause earns its place for a tool this complex.

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 10-parameter tool with nested objects, an output schema, and no annotations, the description covers what an agent needs: what is returned, how overlays and renderers behave, capability prerequisites, fallback semantics, and default link vs inline bytes. Nothing essential for correct invocation 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 already 90%, so the baseline is 3; the description adds real meaning beyond it by explaining how `renderer`, `selection`, `include`, and `inline` interact and what the native/export choice implies for node boxes. It stops short of covering every parameter (e.g. token, agentName, agentModel) in prose, but the schema handles those.

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?

The description gives a specific verb and resource — 'See a design the way a person in the editor sees it' — and enumerates exactly what is returned (PNG canvas with selection outline, reference picture, comment pins, layout bounds, plus JSON with revision and node boxes). It does not, however, explicitly name or contrast itself with close siblings such as ui_builder_export or ui_builder_render_native, so differentiation is left to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the tool is for visually inspecting a design, and the renderer-selection paragraph describes conditional behavior. But there is no explicit 'use this when / use X instead' routing against the many similar render/export siblings, so an agent must infer when this is the right call.

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.