Draw a picture
document.drawCreates 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
| Name | Required | Description | Default |
|---|---|---|---|
| alt | No | The caption, as the person reads it (required on create). | |
| agent | No | This assistant's display name. | |
| label | No | A short name the person sees for this change. | |
| recipe | No | A full drawing recipe, as a read returns it. | |
| shapes | No | A patch to an existing drawing. | |
| figures | No | Figures 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. | |
| document | Yes | The MCP document capability from rapier.open. Keep it private and pass it to later calls. | |
| direction | No | The direction of an automatic figure layout; down by default. | |
| operations | No | Edits to existing shapes by id, applied in order. | |
| operation_id | Yes | A fresh random id for this call (a UUID works). Resend it only to retry this call; the retry replays the recorded result. | |
| recipe_handle | No | Edit: the handle from reading the drawing. | |
| context_handle | No | Create: place the drawing after this block. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | No | ||
| cause | No | ||
| width | No | ||
| height | No | ||
| reason | No | ||
| outcome | Yes | ||
| changeId | No | ||
| document | No | The MCP document capability from rapier.open. Keep it private and pass it to later calls. | |
| reviewId | No | ||
| editCount | No | ||
| structure | No | ||
| documentId | No | ||
| transaction | No | ||
| recipe_handle | No | ||
| representation | No | ||
| documentRevision | No |