add_canvas_elements
Add shapes, text, arrows, and other elements directly to an Excalidraw .canvas.md file, enabling AI assistants to build or update canvas diagrams with planned coordinates and spacing.
Instructions
Add shapes, text, arrows, and other elements to an Excalidraw canvas file. Writes directly to the .canvas.md file on disk. IMPORTANT: Plan sections first — allocate vertical space per section (120-200px each), leave 100-140px gaps between sections, max 3-4 items per row. Use POSITIVE coordinates starting from (0,0), build rightward/downward. Leave 60-80px gaps between elements. Keep text SHORT (max ~30 chars, 1-3 words for shape labels). Use clear_canvas first if redrawing. Call get_canvas_guide first to learn the element format.
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": {
"workspace": "<workspace>",
"canvasPath": "<canvasPath>",
"elements": "<elements>"
},
"name": "add_canvas_elements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| elements | Yes | Array of elements to add to the canvas | |
| workspace | Yes | Workspace path or name | |
| canvasPath | Yes | Canvas file path relative to workspace (e.g., "documents/my-drawing.canvas.md") |