Skip to main content
Glama
Discourse Graph MCP Server

Discourse Graph MCP Server

Official

canvas_add_node

Add a discourse node to a canvas by placing an existing Roam page or creating a typed node from node type and text, returning the new shape ID and page UID.

Instructions

Add a discourse node to a canvas. Either reference an existing Roam page (existing_page = title or uid) or provide node_type + text to create the node page (title formatted per the type's format string; v1 does not fill {Source}-style referenced tokens or insert templates). Pages that match no discourse node type get the generic Page shape. For Roam blocks use canvas_add_block. Returns the new shape id and node page uid.

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": {
      "canvas": "<canvas>"
    },
    "name": "canvas_add_node"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
pageNoTldraw page to target (name or page record id), for canvases with several pages — see canvas_read `pages`. Omit on single-page canvases.
textNoNode content — substituted into the type's {content} format slot
graphNoGraph name or nickname. Auto-selects if only one graph is configured.
canvasYesCanvas page title (e.g. 'Canvas/My Map') or its 9-char page uid
node_typeNoNode type id, name, format tag (e.g. EVD), or shortcut — see canvas_types
existing_pageNoTitle or uid of an existing Roam page to place on the canvas

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does well: it discloses the title-formatting behavior, the v1 limitation that {Source}-style tokens are not resolved and templates are not inserted, the fallback to a generic Page shape for unmatched pages, and the return values (shape id and node page uid). It does not mention that this mutates the workspace by creating a Roam page as a side effect, nor permission requirements.

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, then the two modes, then the caveat, then the sibling pointer and return values — a logical order with no filler sentences. The nested parenthetical about format strings makes one sentence denser than necessary, but no content is wasted.

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 an 8-parameter, no-output-schema creation tool, the description covers the critical decision points, the notable limitation, and the return shape. Remaining gaps are minor: default coordinate behavior and the multi-page `page` parameter are only covered by schema text, not the description.

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?

Schema coverage is 75%, so the schema already documents most parameters. The description still adds real meaning the schema does not enforce: the either/or relationship between existing_page and the node_type + text pair, and the consequence that provided text is formatted through the type's format string. x/y placement and the page parameter are left to the schema.

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 discourse node to a canvas") and immediately differentiates itself from the block sibling ("For Roam blocks use canvas_add_block"). It also defines the domain concept (discourse node) by describing both creation modes, so an agent can distinguish it from canvas_add_text, canvas_add_geo, and canvas_add_subpage without opening a schema.

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?

Explicitly routes between two usage modes: pass existing_page for an existing Roam page, or node_type + text to create a new node page. It names one alternative (canvas_add_block) for the block case. It stops short of stating exclusions such as when to prefer canvas_types/get_discourse_node_types first, but the mode-selection guidance is clear.

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