Skip to main content
Glama

Prepare Draft

prepare_draft

Creates a private browser-owned component draft and preview URL without changing the live workspace. Drafts expire after 15 minutes or browser reload. Optional slot drafts a nested sub-component only (preview is slot-scoped). Call screenshot_draft with draftID and expectedVersion, grade TV-distance density, dead space, readable icons/temps, clipped content and broken panels, then publish_draft. Never put previewURL in chat.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
slotNo
stateNo
titleYes
actionYes
formatYes
sourceYesReact TSX or full HTML. Use a sized nova-video element: YouTube/Vimeo embed URLs play inline, other service URLs are unsupported; do not create launch buttons or placeholders; see /agent media guidance. Arbitrary nested frames stay blocked. Do not author clickable links or external-navigation buttons; keep interactions within the canvas and share external URLs in the agent conversation.
componentIDNo
operationIDYes
controlTokenYes
expectedRevisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / slot
      Added value: +{
      +  "maxLength": 64,
      +  "pattern": "^[a-z][a-z0-9_-]{0,63}$",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, openWorldHint=true, destructiveHint=false; the description adds genuinely new behavior: drafts are private, browser-owned, expire after 15 minutes or a browser reload, and a slot argument changes preview scoping. It also discloses the security constraint that previewURL must never be posted in chat — none of which the annotations convey.

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?

The description is dense but front-loaded: creation and its scope come first, then lifetime, then the parameter nuance, then the prescribed workflow, then the hard constraint. Every clause carries a distinct instruction and nothing is restated from the title or schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Behaviorally it is thorough for a complex tool with no output schema, covering lifetime, scoping and the downstream screenshot/publish chain. But with 11 parameters at 9% schema coverage and no output schema, an agent still cannot learn what controlToken, expectedRevision, operationID or the data/state payloads mean, which is a real gap for a mutation-intent tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 9% across 11 parameters (7 required), so the description carries most of the burden — yet it explains only the optional slot parameter ("drafts a nested sub-component only, preview is slot-scoped"). Required fields like operationID, expectedRevision, controlToken, action, format, componentID, data and state get no semantic explanation anywhere.

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 uses a specific verb+resource pair ("Creates a private browser-owned component draft and preview URL") and immediately scopes it ("without changing the live workspace"), which cleanly separates it from create_component, update_component, publish_draft and update_draft in the sibling list. An agent can tell what this tool produces (a draft ID plus a scoped preview URL) without opening the 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 routes the agent through a concrete sequence (prepare_draft -> screenshot_draft with draftID and expectedVersion -> grade density/dead space/icons/clipping/broken panels -> publish_draft) and states the previewURL handling rule. It lacks an explicit "when not to use this" clause versus create_component/update_component, relying on the phrase "without changing the live workspace" to imply the boundary.

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.

Resources