Draw a boxes-and-arrows diagram
draw_diagramDraw node-and-edge diagrams with automatic layered layouts, directional flow, labels, shapes, colors, and optional grouped frames; set keys and relationships while coordinates are handled for you.
Instructions
Draws nodes and the edges between them, laid out automatically in layers (direction TB, LR, BT or RL), with optional dashed group frames. You choose keys, labels, shapes and colors; it picks every coordinate. To change it afterwards use edit_diagram with the same keys.
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": {
"nodes": "<nodes>"
},
"name": "draw_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Left edge on the board (default: to the right of what is already there) | |
| y | No | Top edge | |
| font | No | ||
| edges | No | ||
| nodes | Yes | ||
| speed | No | How fast shapes appear, so people can follow along (default normal). instant for big changes nobody needs to watch | |
| groups | No | ||
| replace | No | Shapes to delete first (a previous version), so the new one goes in their place. Prefer edit_diagram for changes. | |
| spacing | No | Gap multiplier, 0.5-3 (default 1) | |
| direction | No | TB = top to bottom (default), LR = left to right |