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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYes
workspaceIdYesThe workspace ID
sourceNodeIdYesThe node to connect FROM
targetNodeIdYesThe node to connect TO
sourceSocketIdYesThe OUTPUT socket ID on the source node (e.g., "out_img", "val", "result")
targetSocketIdYesThe INPUT socket ID on the target node (e.g., "prompt", "in_img", "media")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It usefully discloses a validation rule (sockets must match node direction), which is behavioral context beyond a mere label, but it says nothing about failure behavior on invalid sockets, whether duplicate connections are rejected or replaced, permission/auth requirements, or reversibility.

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, the core action front-loaded, and every sentence adds a distinct constraint. No filler or restatement of the name.

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?

For a 6-required-parameter mutation tool with no annotations and no output schema, the description covers the socket semantics well but omits error behavior, duplicate-connection handling, and what the tool returns on success. Adequate but with visible gaps an agent would likely need.

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 defines each field. The description adds a cross-parameter constraint the schema does not state – sourceSocketId must be an output of the source node and targetSocketId an input of the target node – which helps the agent avoid an invalid pairing. It still says nothing about the workflowId/workspaceId relationship.

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 and resource ('Connect two nodes in a workflow') and is immediately distinguishable from siblings like add_node, update_node, and delete_connection. The follow-on sentences narrow the scope to a socket-level linkage, so the agent knows exactly what operation is being performed.

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 clear operational context: use the exact socket IDs returned by add_node, and the sockets must be an output of the source / input of the target. It references the sibling that produces the required IDs (add_node) but does not mention delete_connection for undoing a link or any ordering/prerequisite beyond add_node.

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