Skip to main content
Glama

ui_builder_export_document

Read-only

Compile supplied DesignDocumentV1 content without saving it or reading an existing design. Use an exact catalog pin from ui_builder_list_catalogs. Supports PNG, Remote JSON and RC; returns the same artifact and located diagnostics as saved-document export.

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": {
      "document": "<document>",
      "format": "<format>"
    },
    "name": "ui_builder_export_document"
  }
}

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.
formatYes
documentYesComplete DesignDocumentV1 content, including its catalog pin.
agentNameNoOptional agent/client name shown to design viewers; self-reported.
agentModelNoOptional current model name shown to design viewers; self-reported. Omit when unknown.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, and the description adds substantive behavior on top: compilation is ephemeral (nothing persisted), no existing design is read, and the return is an artifact plus 'located diagnostics' identical to the saved-document path. That diagnostic parity is genuinely useful for an agent interpreting failures. It does not cover cost, size limits, or failure modes for an invalid catalog pin, which keeps it below 5.

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

Conciseness5/5

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

Three short sentences, each carrying distinct information: what it does, which prerequisite tool to call, and what comes back. The distinguishing constraint (no save, no read) is front-loaded in the first sentence where it matters most, and there is 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?

An output schema exists, so the description is not obliged to enumerate return fields, yet it still characterizes the response as an artifact plus located diagnostics. Combined with the catalog-pin prerequisite and the format enumeration, an agent has everything needed to call this correctly for a 5-parameter, nested-object tool.

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 80%, so the schema already documents most parameters, and the baseline would be 3. The description earns above baseline by expanding the enum into human-readable form ('PNG, Remote JSON and RC') and by stating that the document must carry an exact catalog pin — a constraint the nested object schema only hints at.

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 description gives a specific verb ('Compile') and a specific input ('supplied DesignDocumentV1 content'), and immediately scopes it with two negations: it does not save and does not read an existing design. That negation is what separates it from the saved-document export sibling, so an agent can route between them 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 Guidelines4/5

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

It states a concrete prerequisite ('Use an exact catalog pin from ui_builder_list_catalogs') and names the dependency tool explicitly, which is real routing guidance. It implies when to prefer this over saved-document export via 'without saving it or reading an existing design,' but never states the inverse case ('use ui_builder_export when the design already exists') outright, so the guidance is clear rather than exhaustive.

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.