Skip to main content
Glama

Add Canvas Node

add_canvas_node

Add 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

TableJSON 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. Addedv2.0.0
  2. Removedv1.9.0
  3. Changed1 schema field changedv1.5.2
    • addedInput schema / properties / color / pattern
      Added value: +"^([1-6]|#[0-9a-fA-F]{3,8})$"
  4. Addedv0.1.6
  5. Removedv0.1.4
  6. 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)"
  7. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Beyond annotations (which are minimal), the description discloses that the file is persisted (write operation), returns a UUID, and includes auto-stagger logic for coordinates. It does not cover error conditions or permissions, but the key behaviors are transparent.

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

Conciseness5/5

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

The description is two well-structured sentences, front-loading the core purpose and then detailing node types, return value, and coordinate behavior. Every word earns its place with no redundancy.

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

Completeness4/5

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

Given 8 parameters and no output schema, the description covers node types, return value, auto-stagger, and content interpretation. It omits prerequisites (canvas file must exist) and error cases, but overall is sufficiently complete for a creation tool.

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

Parameters4/5

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

With 100% schema coverage, the description still adds value by explaining auto-stagger for x and y coordinates, summarizing node type interpretations, and noting default widths/heights already in schema. The added context goes beyond raw schema details.

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?

The description clearly states it adds a node to an Obsidian canvas and persists the file, using a specific verb+resource. It distinguishes from sibling add_canvas_edge by mentioning the returned UUID is needed to connect nodes.

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?

The description provides clear context for when to use this tool (adding nodes) and hints at its relationship with add_canvas_edge via the UUID return. However, it does not explicitly exclude alternatives or state prerequisites like canvas file existence.

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