Skip to main content
Glama

ui_builder_view

Read-only

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. For a wff-watchface design, frames (2-12) over durationMs, or explicit times, draws the face at several instants instead — use it to check motion: a second hand's sweep, a seconds pulse, anything driven by [SECOND_MILLISECOND], [MILLISECOND] or [UTC_TIMESTAMP] — and ambient: true draws ambient mode (alone: interactive and ambient side by side, to check the transition). The reply is one picture, by default a filmstrip grid with each frame labelled by its UTC time (format: "animated" makes an animated PNG), and motion lists each frame's time, box and hash, with distinctFrames saying whether anything moved. Frames are drawn by the editor's renderer on unsaved copies, at most 12 a call and 6 calls a minute per account; a design that pins environment.fixedTime shows that instant in every frame. It is an occasional look, not a per-edit check: watchFaceCost on each edit stays the per-edit cost signal. Not an McpResponseEnvelopeV1.

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_view"
  }
}

Input Schema

NameRequiredDescriptionDefault
timesNowff-watchface only: the exact instants to draw, in epoch milliseconds, instead of `frames` and `durationMs`.
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.
formatNoWith motion frames: `filmstrip` (default) is one labelled PNG grid, the easiest to read; `animated` is an animated PNG.
framesNowff-watchface only: draw this many frames spread evenly over `durationMs`, starting at the current whole second. Defaults to 6 when only `durationMs` is given.
inlineNoAlso return the PNG as an image block. Defaults to false; a host with no public origin always does.
ambientNowff-watchface only: draw the frames in ambient mode, applying the design's `wff/variant mode=AMBIENT` overrides. Alone, draws the interactive and ambient modes side by side.
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.
durationMsNowff-watchface only: the window the frames cover, in milliseconds. Defaults to 1000.

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed6 schema fields changed
    • addedInput schema / properties / ambient
      Added value: +{
      +  "description": "wff-watchface only: draw the frames in ambient mode, applying the design's `wff/variant mode=AMBIENT` overrides. Alone, draws the interactive and ambient modes side by side.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / durationMs
      Added value: +{
      +  "description": "wff-watchface only: the window the frames cover, in milliseconds. Defaults to 1000.",
      +  "maximum": 86400000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / format
      Added value: +{
      +  "description": "With motion frames: `filmstrip` (default) is one labelled PNG grid, the easiest to read; `animated` is an animated PNG.",
      +  "enum": [
      +    "filmstrip",
      +    "animated"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / frames
      Added value: +{
      +  "description": "wff-watchface only: draw this many frames spread evenly over `durationMs`, starting at the current whole second. Defaults to 6 when only `durationMs` is given.",
      +  "maximum": 12,
      +  "minimum": 2,
      +  "type": "integer"
      +}
    • addedInput schema / properties / times
      Added value: +{
      +  "description": "wff-watchface only: the exact instants to draw, in epoch milliseconds, instead of `frames` and `durationMs`.",
      +  "items": {
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "maxItems": 12,
      +  "minItems": 2,
      +  "type": "array"
      +}
    • addedOutput schema / properties / motion
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "ambientVariants": {
      +          "type": "integer"
      +        },
      +        "cellHeightPx": {
      +          "type": "integer"
      +        },
      +        "cellWidthPx": {
      +          "type": "integer"
      +        },
      +        "distinctFrames": {
      +          "type": "integer"
      +        },
      +        "format": {
      +          "type": "string"
      +        },
      +        "frames": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "ambient": {
      +                "type": "boolean"
      +              },
      +              "changed": {
      +                "type": "boolean"
      +              },
      +              "epochMillis": {
      +                "type": "integer"
      +              },
      +              "height": {
      +                "type": "integer"
      +              },
      +              "index": {
      +                "type": "integer"
      +              },
      +              "label": {
      +                "type": "string"
      +              },
      +              "offsetMs": {
      +                "type": "integer"
      +              },
      +              "sha256": {
      +                "type": "string"
      +              },
      +              "width": {
      +                "type": "integer"
      +              },
      +              "x": {
      +                "type": "integer"
      +              },
      +              "y": {
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "index",
      +              "epochMillis",
      +              "offsetMs",
      +              "label",
      +              "ambient",
      +              "x",
      +              "y",
      +              "width",
      +              "height",
      +              "sha256",
      +              "changed"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "pinnedFixedTime": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "format",
      +        "frames",
      +        "distinctFrames",
      +        "cellWidthPx",
      +        "cellHeightPx"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  4. 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."
  5. 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"
      +}
  6. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint, so the description carries the burden and does so richly: a short-lived signed https link by default with inline bytes on request, a 6-calls-per-minute and 12-frame-per-call limit, capability requirements for the native renderer, drawing on unsaved copies, and fixedTime pinning. It also discloses a non-obvious failure mode -- nodes with no box are reported in notes and never drawn at a guessed position.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The essential framing is front-loaded in the first sentence, and the length is justified by 15 parameters and real rendering complexity. However, it is one unbroken wall of text with long compound sentences and heavy backtick density, making it harder to scan than it needs to be; some renderer-fallback detail could be tightened.

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 15-parameter tool with nested objects and a large behavioral surface, nothing an agent needs in order to call it correctly is missing: defaults, capability gates, rate limits, fallback behavior, and motion-frame semantics are all covered. The odd closing note about not returning McpResponseEnvelopeV1 is a useful envelope caveat rather than filler.

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 93%, so the baseline is 3, but the description genuinely adds meaning: it explains the renderer defaulting logic (native only when a selection must be outlined and the host/grant supports it), what happens with no renderer specified, and how ambient alone produces an interactive/ambient side-by-side. It does not expand much on viewport or the token/header tradeoff beyond what the schema already says.

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?

The opening sentence names a specific verb and resource ('See a design... a PNG of the canvas with the overlays drawn on') and enumerates the exact payload: image plus companion JSON with revision, node boxes, and pin positions. It is unmistakable from neighbors like ui_builder_check_design or ui_builder_diff_designs, which describe designs rather than render them.

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?

It gives clear when-to-use context for the motion path ('use it to check motion: a second hand's sweep...') and an explicit when-not ('It is an occasional look, not a per-edit check: watchFaceCost on each edit stays the per-edit cost signal'). What it lacks is naming a concrete sibling alternative for the per-edit case, leaving the agent to infer which tool to use instead.

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.