Add Canvas Node
add_canvas_nodeAdd a node to an Obsidian canvas with support for text, file, link, or group types. Auto-staggers position to avoid overlap when coordinates are omitted.
Instructions
Add a new node to an Obsidian canvas and persist the updated file. Supports four node types: 'text' (markdown block), 'file' (embedded vault note reference), 'link' (external URL), and 'group' (labeled container). Returns the generated node UUID, needed to connect nodes via add_canvas_edge. When neither x nor y is supplied, the new node is auto-positioned at (50 * existing_count, 50 * existing_count) to avoid stacking multiple defaulted nodes at the origin. Supplying an explicit x or y always overrides this stagger.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X coordinate on the canvas. When omitted (and y is also omitted) the node is auto-staggered to avoid origin pile-up; an explicit value always wins. | |
| y | No | Y coordinate on the canvas. When omitted (and x is also omitted) the node is auto-staggered to avoid origin pile-up; an explicit value always wins. | |
| type | Yes | Node kind: 'text' = markdown block, 'file' = vault note reference, 'link' = external URL, 'group' = labeled container | |
| color | No | Color: '1'-'6' for Obsidian's preset palette (red/orange/yellow/green/cyan/purple), or a hex code like '#ff5555' | |
| width | No | Node width in pixels (default: 250, max: 10000) | |
| height | No | Node height in pixels (default: 60, max: 10000) | |
| content | Yes | Interpretation depends on type: text body for 'text', relative note path for 'file', URL for 'link', display label for 'group' | |
| canvasPath | Yes | Relative path from vault root to the target .canvas file |