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
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | ||
| workspaceId | Yes | The workspace ID | |
| sourceNodeId | Yes | The node to connect FROM | |
| targetNodeId | Yes | The node to connect TO | |
| sourceSocketId | Yes | The exact OUTPUT socket ID on the saved source node (e.g., "image", "video", "val", "result") | |
| targetSocketId | Yes | The exact INPUT socket ID on the saved target node (e.g., "prompt", "input_image_url", "media") |