Skip to main content
Glama

Rapier

Draw a picture

document.draw
Destructive

Creates or edits SVG figures for an editable diagram or spatial sketch in the active document. Use native figures for movable objects and document source for Mermaid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
altNoThe caption, as the person reads it (required on create).
agentNoThis assistant's display name.
labelNoA short name the person sees for this change.
recipeNoA full drawing recipe, as a read returns it.
shapesNoA patch to an existing drawing.
figuresNoFigures use kind, not type. Example: [{"kind":"rect","id":"start","label":"Start"},{"kind":"rect","id":"end","label":"Finish"},{"kind":"arrow","from":"start","to":"end"}]. Omit x, y, w and h for automatic layout.
documentYesThe MCP document capability from rapier.open. Keep it private and pass it to later calls.
directionNoThe direction of an automatic figure layout; down by default.
operationsNoEdits to existing shapes by id, applied in order.
operation_idYesA fresh random id for this call (a UUID works). Resend it only to retry this call; the retry replays the recorded result.
recipe_handleNoEdit: the handle from reading the drawing.
context_handleNoCreate: place the drawing after this block.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetNo
causeNo
widthNo
heightNo
reasonNo
outcomeYes
changeIdNo
documentNoThe MCP document capability from rapier.open. Keep it private and pass it to later calls.
reviewIdNo
editCountNo
structureNo
documentIdNo
transactionNo
recipe_handleNo
representationNo
documentRevisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the safety profile is covered. The description adds no behavioral context of its own: it never warns that remove/delete operations destroy shapes, says nothing about layout side effects, and offers no note on permissions or replay semantics beyond what the schema's operation_id text already gives.

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?

Two tight sentences with the core capability front-loaded and the mode-selection rule second. No filler, no restatement of the tool title.

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?

An output schema exists and the schema is fully documented, so the description need not cover return values. However, for a 12-parameter tool with nested objects and two distinct modes (create via context_handle, edit via recipe_handle), the description omits the create/edit distinction and any sequencing context, leaving it thinner than the tool's complexity warrants.

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

Parameters3/5

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

Schema description coverage is 100%, including detailed enum and nested-object documentation, so the baseline is 3. The description adds no parameter-level meaning beyond what the schema already provides (e.g. it does not explain the recipe_handle vs context_handle create/edit split that the schema carries).

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?

States a specific verb pair (creates/edits) and resource (SVG figures for an editable diagram or spatial sketch in the active document), which is concrete and distinguishes this from text-oriented siblings like document.apply_edits. It does not, however, explicitly contrast itself with any named sibling tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The sentence 'Use native figures for movable objects and document source for Mermaid' gives a real routing rule between two representation modes, which is useful. But there is no guidance on when to use this tool versus document.apply_edits or document.inspect_visual, nor any stated prerequisite for the create vs edit paths.

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.