canvas
Create an Obsidian canvas file to visualize concepts and connections.Parameters
List of node objects following JSON Canvas 1.0 spec. Each node must have:
id(string) - Unique identifiertype(string) - Node type: “file”, “text”, “link”, or “group”x(number) - X coordinate in pixelsy(number) - Y coordinate in pixelswidth(number) - Width in pixelsheight(number) - Height in pixels
- file nodes:
file(string) - Path to file (e.g., “docs/Document.md”) - text nodes:
text(string) - Text content - link nodes:
url(string) - URL to link to - group nodes: Group styling properties
color(string) - Color code “1”-“6” or hex valuelabel(string) - Node label
List of edge objects following JSON Canvas 1.0 spec. Each edge must have:
id(string) - Unique identifierfromNode(string) - Source node IDtoNode(string) - Target node ID
label(string) - Edge labelcolor(string) - Color code or hex valuefromSide(string) - “top”, “right”, “bottom”, “left”toSide(string) - “top”, “right”, “bottom”, “left”
The title of the canvas (saved as
title.canvas)Directory path relative to project root. Examples:
diagramsprojects/2025visual/maps
Project name to create canvas in. Optional - server resolves using hierarchy.
Cloud workspace name or tenant_id
Returns
A summary of the created canvas file including:
- Creation/update status
- File path
- Confirmation that canvas is ready to open in Obsidian
JSON Canvas Structure
The canvas file follows the JSON Canvas 1.0 specification:Node Types
File Node
References an existing file in the knowledge base:Text Node
Contains markdown text content:Link Node
Contains a URL:Group Node
Groups other nodes visually:Edge Configuration
Basic Edge
Labeled Edge
Directional Edge
"top", "right", "bottom", "left"
Color Codes
Colors can be specified as:- Numbered colors: “1” through “6” (Obsidian’s default palette)
- Hex colors: “#FF5733”, “#3498DB”, etc.
Examples
Simple Concept Map
Document Relationship Diagram
Process Flow with Groups
Important Notes
- File Paths: When referencing files, use the exact path as shown in Obsidian (e.g., “docs/Document Name.md”), not permalink format.
- File Existence: For file nodes, the referenced file must exist in the knowledge base.
- Coordinates: Position nodes using x,y coordinates in pixels. Plan a logical layout before creating the canvas.
- Node Sizing: Provide appropriate width and height for each node based on its content.
-
Uniqueness: Each node and edge must have a unique
id. - Updates: If a canvas file already exists, it will be updated with the new content.