Skip to main content
Glama

Compose Preview Catalogs

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. A node with no box is reported, 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.
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.
selectionNoNode ids to show as selected.

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. Added

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the default short-lived signed https link, the inline byte behavior and host fallback, the export-vs-native renderer tradeoff, the ui-builder-export capability requirement, and that unboxed nodes are reported rather than drawn at a guessed position. It omits side-effect/read-only framing and rate-limit context.

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?

Dense and front-loaded — the core output (PNG with overlays plus JSON) leads, then optionality, then renderer caveats. Sentences are long but each carries distinct information; no filler.

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?

Given an output schema exists, the description needn't detail returns, yet it still specifies the JSON contents (revision, node ids/boxes, pin threads/positions) and the envelope caveat ('Not an McpResponseEnvelopeV1'). For an 8-param tool with one enum and nested viewport, this is complete enough to invoke correctly.

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 88%, so the 3 baseline is met by the schema; the description adds real meaning beyond it by explaining renderer semantics (export vs native, capability, box reporting), what each overlay in `include` draws, and the image-pixel coordinate basis of the returned JSON. This exceeds the baseline the schema alone would justify.

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+resource: render a design the way the editor shows it, as a PNG with overlays plus JSON metadata. It clearly distinguishes itself from siblings like ui_builder_render_native and ui_builder_export by naming the composite (image + JSON report) output and the overlay set.

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?

Gives strong in-tool context: the default export renderer reports no node boxes, native is needed when selection must be outlined and requires the ui-builder-export capability, and inline:true vs the default signed link. It does not explicitly route to sibling tools (e.g. when to prefer ui_builder_render_native or ui_builder_export instead), so it stops short of full alternative guidance.

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.