Skip to main content
Glama

connect_nodes

Connect two nodes in a workflow. The sourceSocketId MUST be an output of the source node, and the targetSocketId MUST be an input of the target node. Use the exact socket IDs returned by add_node.

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": {
      "workspaceId": "<workspaceId>",
      "workflowId": "<workflowId>",
      "sourceNodeId": "<sourceNodeId>",
      "sourceSocketId": "<sourceSocketId>",
      "targetNodeId": "<targetNodeId>",
      "targetSocketId": "<targetSocketId>"
    },
    "name": "connect_nodes"
  }
}

Input Schema

NameRequiredDescriptionDefault
workflowIdYes
workspaceIdYesThe workspace ID
sourceNodeIdYesThe node to connect FROM
targetNodeIdYesThe node to connect TO
sourceSocketIdYesThe exact OUTPUT socket ID on the saved source node (e.g., "image", "video", "val", "result")
targetSocketIdYesThe exact INPUT socket ID on the saved target node (e.g., "prompt", "input_image_url", "media")

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / sourceSocketId / description
      Previous value: -"The OUTPUT socket ID on the source node (e.g., \"out_img\", \"val\", \"result\")"New value: +"The exact OUTPUT socket ID on the saved source node (e.g., \"image\", \"video\", \"val\", \"result\")"
    • changedInput schema / properties / targetSocketId / description
      Previous value: -"The INPUT socket ID on the target node (e.g., \"prompt\", \"in_img\", \"media\")"New value: +"The exact INPUT socket ID on the saved target node (e.g., \"prompt\", \"input_image_url\", \"media\")"
  2. First observed

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It discloses a directional validation constraint (sourceSocketId must be an output, targetSocketId an input) and a cross-tool ID provenance rule, but says nothing about idempotency, duplicate-connection behavior, cycle prevention, permissions, or what a successful call returns.

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?

Three short sentences, front-loaded with the action, then the hard constraint, then the ID-sourcing rule. No filler or restated title.

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

Completeness3/5

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

There is no output schema and no annotations, so the description is the only place mutation semantics could live, and it omits success/failure behavior entirely. For a six-parameter mutation with cross-tool ID dependencies, that leaves a meaningful gap despite the strong socket-validation guidance.

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 83%, so the schema already establishes baseline meaning for the six parameters. The description adds genuine value beyond it by stating the directionality contract (output vs input socket) and that socket IDs must be the exact ones returned by add_node rather than arbitrary strings.

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?

The description names a specific verb and resource ("Connect two nodes in a workflow") and implicitly separates itself from siblings such as add_node, update_node, and delete_connection. It never explicitly names an alternative sibling for routing, which keeps it just short of 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 Guidelines4/5

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

It gives a real prerequisite and ordering hint: socket IDs must come from add_node, so nodes must be created before connecting. It lacks any when-not guidance (e.g., don't use when a connection already exists, use delete_connection to undo), so it is clear context without exclusions.

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.