Skip to main content
Glama

ui_builder_editor_write

The UI Builder editor app's save: the whole document at baseRevision. Answers saved, conflict, read-only or too-large. Called by the app, not the model.

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>",
      "baseRevision": "<baseRevision>",
      "document": "<document>"
    },
    "name": "ui_builder_editor_write"
  }
}

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.
designIdYes
documentYesThe whole DesignDocumentV1.
agentNameNoOptional agent/client name shown to design viewers; self-reported.
agentModelNoOptional current model name shown to design viewers; self-reported. Omit when unknown.
baseRevisionYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly=false, idempotent=false, destructive=false. The description adds real value on top: it discloses that the entire document is replaced (not merged), that baseRevision drives conflict detection, and that the result is one of four states including conflict, read-only and too-large. It does not spell out the consequence of a stale baseRevision beyond the word 'conflict'.

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 terse clauses, front-loaded with the action and scope, then the outcome set, then the audience restriction. No sentence is redundant and nothing needs trimming.

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, so enumerating return values is unnecessary, and the description still summarizes the four result states. For a six-parameter write tool with nested payload, the main residual gap is the absence of an explicit pointer to the model-facing alternative, which is minor given the deliberate 'not the model' framing.

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 a middling 67%, so the description has to carry weight — and it does, clarifying that 'document' is the complete DesignDocumentV1 and that 'baseRevision' is the revision the save is pinned to. designId is left self-evident and the token/agent metadata are already documented in the schema.

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?

Names a specific verb and resource: the editor app's save of the whole DesignDocumentV1 at a base revision. The clause 'Called by the app, not the model' sharply distinguishes it from the model-facing edit/apply siblings, though it never names which sibling the model should use instead.

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?

'Called by the app, not the model' is an explicit exclusion that tells an agent to stay away and pick a different path. It gives clear context for who invokes it, but leaves the model to infer the correct alternative (e.g. ui_builder_edit_design or ui_builder_apply) from the sibling list.

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.