Draw on a Napkin board
napkin_drawDraws shapes, strokes, and labels on a board — diagram on a sketch, annotate a deck slide — and, via updates / deletes, changes or removes shapes that are already there (ids from napkin_boards_get; the fix for something you drew wrong). For NEW elements never compute absolute board coordinates: with slide, coordinates are slide-local — (0, 0) top-left to (960, 540) bottom-right of that slide. Without slide (sketches), (0, 0) is the top-left of the existing content — the same area napkin_boards_view renders, so place by what you saw there; on an empty board just start at (0, 0). Example — circle a slide's title and margin-note it:
{"boardId": "…", "slide": 2, "elements": [ {"type": "ellipse", "x": 60, "y": 40, "w": 400, "h": 90, "color": "#dc2626"}, {"type": "arrow", "x": 560, "y": 140, "x2": 470, "y2": 90, "color": "#dc2626"}, {"type": "text", "x": 575, "y": 130, "w": 260, "text": "tighten this claim", "color": "#dc2626"} ]}
After drawing, cite the board with [[board:ID]] alone on its own line.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slide | No | 1-based slide number (decks only) — makes coordinates slide-local. | |
| boardId | Yes | Napkin board id. | |
| deletes | No | Ids of existing shapes to remove (from napkin_boards_get). | |
| updates | No | Existing shapes to change — move, resize, retext, restyle. Read napkin_boards_get first for ids and current geometry. | |
| elements | No | New elements to draw, painted in order. | |
| workspace | No | Workspace slug. Personal tokens with no default workspace MUST pass this; tokens with a default can override per call. Ignored for workspace API keys. |