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. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  2. 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\")"
  3. First observed

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses the validation rule that sockets must match node direction, but says nothing about whether the connection is persisted, what happens on duplicate or cyclic connections, or what permissions are required for this mutation.

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 and immediately followed by the two hard constraints that cause most failures. No filler text, no restatement of the tool name.

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 six-parameter mutation tool with no annotations and no output schema, the description covers the highest-risk failure mode (socket direction and ID provenance). Missing are mutation semantics and failure behavior, which an agent would want to know before wiring up a workflow.

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 already 83%, and the description adds provenance information beyond the schema by stating the socket IDs must be the exact ones returned by add_node, plus reinforcing the output-vs-input direction constraint. It does not clarify workspaceId or workflowId semantics, but those are already documented.

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 specific verb and resource ('Connect two nodes in a workflow'), which is clearly distinct from sibling creation tools like add_node or create_workflow. It does not explicitly name or contrast with an alternative, 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?

Gives a clear precondition for use: the source socket must be an output of the source node and the target socket an input of the target node, and the IDs must come from add_node. This implicitly establishes the correct call ordering (add_node before connect_nodes) but offers no when-not guidance or error-recovery advice.

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.