Skip to main content
Glama

add_node

Adds a new node (entity) to a live Trident document. The node appears immediately for all collaborators. Requires a valid editor access token. Before adding nodes: call open_document to understand the diagram layout and pick sensible positions; call get_document_summary to get all existing entity IDs so you can avoid duplicates. IMPORTANT: if this node belongs inside a container, pass node.container on THIS call — do NOT create the node without a container and reparent it later via update_node. Orphaned nodes appear immediately to all live collaborators and create unnecessary visual churn.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeYesNode definition. ERD field rows: when node.container is an ERD table (a container with kind:"erd"), the node becomes that table's next row — give only id, label (e.g. "🔑 id", "🔗 user_id", "email") and container, and do NOT pass x/y: the row is placed and the table resized for you.
tokenYesEditor access token for this document. The document ID is embedded in the token.
agentIdYesYOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
userNameNoFirst name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
action_explanationNoOptional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / node / description
      Previous value: -"Node definition"New value: +"Node definition. ERD field rows: when node.container is an ERD table (a container with kind:\"erd\"), the node becomes that table's next row — give only id, label (e.g. \"🔑 id\", \"🔗 user_id\", \"email\") and container, and do NOT pass x/y: the row is placed and the table resized for you."
    • changedInput schema / properties / node / properties / container / description
      Previous value: -"ID of the container this node belongs in. Set this NOW if you know the parent — do not create the node orphaned and reparent later with update_node. Treat this as required whenever the node has a logical parent container."New value: +"ID of the container this node belongs in. Set this NOW if you know the parent — do not create the node orphaned and reparent later with update_node. Treat this as required whenever the node has a logical parent container. If that container has an explicit width/height (a fixed size) and this node's position falls outside it, ALSO call update_container to enlarge the container (width/height, and x/y if needed) so the node fits — containers are centred on x/y, so their edges are at x ± width/2 and y ± height/2; leave ~40 units of padding. (The canvas grows the container on screen anyway, but the document keeps the old size until you resize it.)"
  2. Changed1 schema field changed
    • changedInput schema / properties / node / properties / shapeType / description
      Previous value: -"Optional: shape type, e.g. \"diamond\", \"rectangle\""New value: +"Optional: shape type. Default \"rectangle\"; \"diamond\" for decisions. Registered collections: Flowchart (\"flowchart-process\", \"flowchart-rounded\", \"flowchart-stadium\", \"flowchart-cylinder\", \"flowchart-circle\", \"flowchart-double-circle\", \"flowchart-decision\", \"flowchart-hexagon\", \"flowchart-parallelogram\", \"flowchart-trapezoid\", etc.), BPMN (\"bpmn-start-event\", \"bpmn-end-event\", \"bpmn-gateway\", \"bpmn-task\", \"bpmn-user-task\", \"bpmn-subprocess\", etc.; labels render under events/gateways), UML (\"uml-class\", \"uml-interface\", \"uml-package\", \"uml-component\", \"uml-database\", \"uml-actor\", \"uml-state\", \"uml-action\", etc.), General primitives (\"circle\", \"cylinder\", \"hexagon\", \"rounded-rect\", \"parallelogram\", \"trapezoid\", etc.), or Organic (\"cloud\", \"star\", \"heart\", etc.). Unknown values fall back to rectangle."
  3. Changed3 schema fields changed
    • addedInput schema / properties / node / properties / color
      Added value: +{
      +  "description": "Optional: background/fill color (hex like \"#438DD5\" or a color name). Set on THIS call — do not add the node and recolor it later with update_node.",
      +  "type": "string"
      +}
    • addedInput schema / properties / node / properties / outlineColor
      Added value: +{
      +  "description": "Optional: border/outline color (hex or color name).",
      +  "type": "string"
      +}
    • addedInput schema / properties / node / properties / textColor
      Added value: +{
      +  "description": "Optional: label text color (hex or color name), e.g. \"#FFFFFF\".",
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • changedInput schema / properties / node / properties / container / description
      Previous value: -"Optional: ID of a container to place this node inside"New value: +"ID of the container this node belongs in. Set this NOW if you know the parent — do not create the node orphaned and reparent later with update_node. Treat this as required whenever the node has a logical parent container."
  5. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare the safety profile (not read-only, not idempotent, open-world, non-destructive), and the description adds genuinely new behavior: the node is broadcast immediately to all live collaborators, an editor access token is required, and orphaned nodes cause visible churn. That is real collaboration/state context beyond the structured hints.

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?

Purpose is front-loaded in the first sentence and the prerequisite ordering reads cleanly. It is somewhat long, and the container warning is repeated in both the description and the schema, but no sentence is pure filler.

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 live mutating tool with a nested payload and no output schema, the description covers prerequisites, ordering, container/ERD handling and the collaboration side effects. It stops short of describing failure modes (e.g. invalid token, duplicate id) which would be useful for a non-idempotent write.

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% and the nested node object is thoroughly documented field-by-field, so the schema already carries the parameter meaning. The description's container and 'set on THIS call' guidance largely restates the container schema description, adding sequencing advice but little new per-parameter semantics.

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 concrete verb and resource ('Adds a new node (entity)'), and immediately scopes it to a live Trident document, which cleanly separates it from add_container, add_connection and add_annotation. An agent can identify the operation without opening the schema.

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

Usage Guidelines5/5

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

Explicitly prescribes the prerequisites and ordering: call open_document to understand layout, call get_document_summary to gather entity IDs and avoid duplicates, and pass container on this call rather than reparenting later. It also names the alternative anti-pattern (create orphan then update_node) and why it is wrong.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.