Skip to main content
Glama

Add canvas edge

add_canvas_edge

Connect two existing canvas nodes by adding an edge between them, with optional label, color, and source/target sides. Use it to define relationships in Obsidian canvas files.

Instructions

Add an edge between two existing nodes in canvas

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": {
      "canvasPath": "<canvasPath>",
      "fromNode": "<fromNode>",
      "toNode": "<toNode>"
    },
    "name": "add_canvas_edge"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorNoColor: preset "1"-"6" or hex such as "#ff0000"
labelNoEdge label
vaultNoVault name. May be omitted when only one vault is configured; see list_vaults.
toNodeYesTarget node ID
toSideNoSide of the target node the edge arrives at (default: left)
fromNodeYesSource node ID
fromSideNoSide of the source node the edge leaves from (default: right)
canvasPathYesPath to canvas file (".canvas" may be omitted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv2.0.1
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • changedInput schema / properties / canvasPath / description
      Previous value: -"Path to canvas file"New value: +"Path to canvas file (\".canvas\" may be omitted)"
    • addedInput schema / properties / canvasPath / minLength
      Added value: +1
    • changedInput schema / properties / color / description
      Previous value: -"Edge color (1-6)"New value: +"Color: preset \"1\"-\"6\" or hex such as \"#ff0000\""
    • addedInput schema / properties / fromNode / minLength
      Added value: +1
    • addedInput schema / properties / fromSide
      Added value: +{
      +  "description": "Side of the source node the edge leaves from (default: right)",
      +  "enum": [
      +    "top",
      +    "right",
      +    "bottom",
      +    "left"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / toNode / minLength
      Added value: +1
    • addedInput schema / properties / toSide
      Added value: +{
      +  "description": "Side of the target node the edge arrives at (default: left)",
      +  "enum": [
      +    "top",
      +    "right",
      +    "bottom",
      +    "left"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / vault / description
      Previous value: -"Vault name"New value: +"Vault name. May be omitted when only one vault is configured; see list_vaults."
    • changedInput schema / required
      Previous value: -[
      -  "vault",
      -  "canvasPath",
      -  "fromNode",
      -  "toNode"
      -]New value: +[
      +  "canvasPath",
      +  "fromNode",
      +  "toNode"
      +]
  2. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds the precondition that both nodes must already exist, but says nothing about duplicate-edge handling, failure behavior, or what the call returns. That extra context is modest but not trivial for a mutation tool.

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?

One short, front-loaded sentence with no filler or redundancy. It is efficient, though it is arguably too terse to carry much structure beyond the single clause.

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?

For a simple graph-mutation tool with full schema coverage, complete annotations, and no output schema, the definition covers what is needed to call it correctly. Only minor behavioral details, such as duplicate-edge or error behavior, are missing.

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%, with all eight parameters documented in-schema including color presets, side enums, defaults and the optional vault lookup. The description adds no parameter meaning beyond that, so the baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource ('Add an edge') and scopes it to 'between two existing nodes in canvas', which clearly separates it from add_canvas_node and delete_canvas_edge. It stops short of naming an alternative explicitly, so it is not quite a 5.

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

Usage Guidelines3/5

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

The phrase 'between two existing nodes' implies the prerequisite that both endpoints must already exist, which is genuinely useful context. However, there is no explicit when-to-use vs. when-not guidance, and no mention of related tools such as add_canvas_node for creating the endpoints first.

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