Skip to main content
Glama

Add Canvas Node

add_canvas_node

Add text, file, link, or group nodes to an Obsidian canvas and persist the updated file; returns the node UUID needed to connect edges.

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

NameRequiredDescriptionDefault
xNoX 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.
yNoY 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.
typeYesNode kind: 'text' = markdown block, 'file' = vault note reference, 'link' = external URL, 'group' = labeled container
colorNoColor: '1'-'6' for Obsidian's preset palette (red/orange/yellow/green/cyan/purple), or a hex code like '#ff5555'
widthNoNode width in pixels (default: 250, max: 10000)
heightNoNode height in pixels (default: 60, max: 10000)
contentYesInterpretation depends on type: text body for 'text', relative note path for 'file', URL for 'link', display label for 'group'
canvasPathYesRelative path from vault root to the target .canvas file

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.1.1
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Addedv2.0.0
  3. Removedv1.9.0
  4. Changed1 schema field changedv1.5.2
    • addedInput schema / properties / color / pattern
      Added value: +"^([1-6]|#[0-9a-fA-F]{3,8})$"
  5. Addedv0.1.6
  6. Removedv0.1.4
  7. Changed12 schema fields changedv0.1.2
    • changedInput schema / properties / canvasPath / description
      Previous value: -"Relative path to the .canvas file"New value: +"Relative path from vault root to the target .canvas file"
    • changedInput schema / properties / color / description
      Previous value: -"Color: '1'-'6' for Obsidian palette, or hex"New value: +"Color: '1'-'6' for Obsidian's preset palette (red/orange/yellow/green/cyan/purple), or a hex code like '#ff5555'"
    • changedInput schema / properties / content / description
      Previous value: -"Text content, file path, URL, or group label depending on type"New value: +"Interpretation depends on type: text body for 'text', relative note path for 'file', URL for 'link', display label for 'group'"
    • changedInput schema / properties / height / description
      Previous value: -"Node height"New value: +"Node height in pixels (default: 60)"
    • addedInput schema / properties / height / minimum
      Added value: +1
    • changedInput schema / properties / height / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / type / description
      Previous value: -"Node type"New value: +"Node kind: 'text' = markdown block, 'file' = vault note reference, 'link' = external URL, 'group' = labeled container"
    • changedInput schema / properties / width / description
      Previous value: -"Node width"New value: +"Node width in pixels (default: 250)"
    • addedInput schema / properties / width / minimum
      Added value: +1
    • changedInput schema / properties / width / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / x / description
      Previous value: -"X position"New value: +"X coordinate on the canvas (default: 0)"
    • changedInput schema / properties / y / description
      Previous value: -"Y position"New value: +"Y coordinate on the canvas (default: 0)"
  8. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, so the safety profile is covered. The description adds real value beyond that: it discloses the persistence side effect ('persist the updated file'), the return value, and a non-obvious positioning heuristic that prevents origin stacking. It doesn't say what happens on invalid canvas paths or whether concurrent writes clobber, keeping it at 4.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and node types, then return value, then the positioning rule. Four sentences all earning their place, though the auto-position explanation is somewhat verbose and partially duplicates the schema wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter mutation tool with no output schema, the description covers the action, node-type branching, side effects, return value, and the key defaulting rule. An agent has everything needed to invoke it correctly and chain to add_canvas_edge.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter is already documented, including the auto-stagger behavior on x/y and content interpretation per type. The description largely restates that schema content at the aggregate level rather than adding new syntax or format detail. Baseline 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Add a new node to an Obsidian canvas') and enumerates the four node types with their semantics. It is clearly distinguished from the siblings read_canvas and add_canvas_edge, the latter of which is explicitly named as the follow-up consumer of the returned UUID.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear operational context: the returned UUID is 'needed to connect nodes via add_canvas_edge', which routes the agent to the correct next tool. It also states explicitly when auto-positioning applies and that explicit coordinates win. It does not state exclusions (e.g. prefer read_canvas first to inspect existing nodes), so it falls short of a full usage contract.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.