Skip to main content
Glama

Connect nodes

canvas_connect_nodes

When: Use to draw the flows that genuinely move data between two nodes. Never connect a zone: connect a node inside it.

Draw edges (arrows) between nodes to show how data flows. Label an edge only when the reader could not guess what it does ("CDC", "hourly batch"); obvious flows and dimensional joins read better unlabelled. Edges always render with an arrowhead at the target; bidirectional adds one at the source.

Batch: edges (up to 60) takes a list; put every item in one call rather than one call per item.

Operates on one Datadef diagram, named by diagram_id.

Returns compact JSON: the ids it created, changed or removed, the diagram revision, a one-line summary and the next step. A viewer-role account is refused.

Next: canvas_layout_canvas once, when the structure is complete.

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": {
      "diagram_id": "<diagram_id>",
      "edges": "<edges>"
    },
    "name": "canvas_connect_nodes"
  }
}

Input Schema

NameRequiredDescriptionDefault
edgesYes
diagram_idYesDiagram id, from list_diagrams, create_diagram or create_blank_diagram.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / diagram_id / description
      Previous value: -"Canvas id, from list_diagrams, create_diagram, or create_blank_diagram."New value: +"Diagram id, from list_diagrams, create_diagram or create_blank_diagram."
    • addedInput schema / properties / edges / items / properties / bidirectional
      Added value: +{
      +  "description": "Arrowheads on both ends, for a genuinely two-way link. Not a replacement for existing edges in each direction.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / edges / items / properties / color
      Added value: +{
      +  "description": "Override the edge colour (default: the source node's hue).",
      +  "type": "string"
      +}
    • changedInput schema / properties / edges / items / properties / label / description
      Previous value: -"What this connection does. Required."New value: +"What this connection does, when not obvious."
    • changedInput schema / properties / edges / items / required
      Previous value: -[
      -  "source",
      -  "target",
      -  "label"
      -]New value: +[
      +  "source",
      +  "target"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no output schema, the description carries the return contract itself ('compact JSON: the ids it created, changed or removed, the diagram revision, a one-line summary and the next step') and discloses an auth constraint ('A viewer-role account is refused') plus rendering semantics ('arrowhead at the target; bidirectional adds one at the source'). This is substantial disclosure beyond the annotations, which only cover the safety profile.

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?

Front-loaded with the 'When:' clause and then cleanly partitioned into Batch / Returns / Next sections. Every sentence carries actionable content — batching, return shape, follow-up step — with no filler.

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

Completeness5/5

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

For a two-parameter mutation tool with no output schema, the description covers the missing pieces an agent needs: return shape, auth refusal, batch limits, and the prescribed next step (canvas_layout_canvas once the structure is complete). Nothing required to invoke it correctly is absent.

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 only 50%, and the description compensates by explaining the batch semantics of `edges` (up to 60, one call) and the intent behind `label` ('only when the reader could not guess what it does'). The nested item fields are already well documented in the schema, so this adds meaning where the schema was thin rather than duplicating it.

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 concrete verb+resource: 'Draw edges (arrows) between nodes to show how data flows,' and constrains scope with 'Operates on one Datadef diagram, named by diagram_id.' It is clear on its own, but it never differentiates itself from closely-named siblings like canvas_add_flow_arrow, canvas_add_lineage or canvas_update_edges, which an agent must disambiguate against.

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?

Gives explicit when-to-use ('flows that genuinely move data'), an exclusion ('Never connect a zone: connect a node inside it'), labelling guidance, and a batching rule ('put every item in one call rather than one call per item'). It stops short of naming an alternative tool, so it is strong context rather than full routing.

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.

Resources