Skip to main content
Glama

add_connection

Adds a connection (arrow/edge) between two nodes or containers in a live Trident document. Use get_document_summary to get valid source and target IDs before calling this. Requires a valid editor access token. For ERD relationships, connect the two TABLE containers (field rows are rejected as endpoints) and set type to an ERD pair such as "one_to_many".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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]".
connectionYes
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 / connection / properties / routingMode / description
      Previous value: -"Optional: routing algorithm (e.g. \"straight\", \"bezier\", \"orthogonal\")"New value: +"Optional: routing algorithm: \"straight\" (default), \"bezier\", or \"orthogonal\". Avoid \"orthogonal\" unless the user asks for it: edges on one side of a node share a single port, so right-angle paths overlap."
    • changedInput schema / properties / connection / properties / type / description
      Previous value: -"Optional: connection type. Line styles: \"arrow\" (default), \"line\", \"thick_arrow\", \"dashed_arrow\", \"dotted_arrow\", \"wave\". ERD relationship pairs \"<source>_to_<target>\", each end one of one | many | zero_or_one | zero_or_many | one_or_many — e.g. \"one_to_many\", \"one_to_zero_or_many\", \"many_to_many\", \"one_to_one\". ERD pairs are solid lines with crow's-foot markers at each end."New value: +"Optional: connection type. Line styles: \"arrow\" (default), \"line\", \"thick_arrow\", \"dashed_arrow\", \"dotted_arrow\", \"wave\" (avoid unless the user asks for it: renders as a thick ribbon that hides labels). ERD relationship pairs \"<source>_to_<target>\", each end one of one | many | zero_or_one | zero_or_many | one_or_many — e.g. \"one_to_many\", \"one_to_zero_or_many\", \"many_to_many\", \"one_to_one\". ERD pairs are solid lines with crow's-foot markers at each end."
  2. Changed1 schema field changed
    • changedInput schema / properties / connection / properties / type / description
      Previous value: -"Optional: connection type (e.g. \"dotted\", \"dashed\", \"bold\", \"wave\")"New value: +"Optional: connection type. Line styles: \"arrow\" (default), \"line\", \"thick_arrow\", \"dashed_arrow\", \"dotted_arrow\", \"wave\". ERD relationship pairs \"<source>_to_<target>\", each end one of one | many | zero_or_one | zero_or_many | one_or_many — e.g. \"one_to_many\", \"one_to_zero_or_many\", \"many_to_many\", \"one_to_one\". ERD pairs are solid lines with crow's-foot markers at each end."
  3. Changed2 schema fields changed
    • changedInput schema / properties / connection / properties / routingMode / description
      Previous value: -"Optional: routing algorithm (e.g. \"straight\", \"orthogonal\")"New value: +"Optional: routing algorithm (e.g. \"straight\", \"bezier\", \"orthogonal\")"
    • changedInput schema / properties / connection / properties / type / description
      Previous value: -"Optional: connection type (e.g. \"dotted\", \"dashed\", \"bold\")"New value: +"Optional: connection type (e.g. \"dotted\", \"dashed\", \"bold\", \"wave\")"
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=false, idempotent=false, openWorld=true. The description adds behavioral context the annotations don't carry: an editor token is mandatory, field rows are rejected as endpoints, and ERD pairs render as solid lines with crow's-foot markers. It does not mention return behavior or whether layout is reflowed, hence not a 5.

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?

Four sentences, front-loaded with purpose and then prerequisites and the ERD special case. Each sentence carries distinct information; only the ERD sentence is dense enough that it could be split for readability.

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 mutation tool with a nested schema and no output schema, the description covers purpose, prerequisites, auth, and the main structural pitfall (endpoint type). It omits what the call returns and whether auto-generated IDs are surfaced, which are minor given no output schema exists.

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 80%, so the baseline is 3, but the description adds real meaning beyond the schema: it explains what a valid source/target is (container IDs, not field rows) and shows concrete enum-like values for type ("one_to_many", "one_to_zero_or_many"). It adds the semantics the schema's string fields leave open.

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 (adds) and resource (a connection/arrow/edge) with scope (between two nodes or containers in a live Trident document). This clearly distinguishes it from siblings like add_node, add_container, and delete_connection without requiring 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 routes the agent through a prerequisite ("Use get_document_summary to get valid source and target IDs before calling this"), states the access requirement ("Requires a valid editor access token"), and gives a concrete when-to branch ("For ERD relationships, connect the two TABLE containers... set type to an ERD pair"). These are actionable conditions, not implied usage.

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.