workflow_add_edge
Add an edge/connection between two nodes for execution flow.
IMPORTANT RULES:
There can only be ONE edge between any two nodes
Edges control EXECUTION FLOW, not data flow
Data connections are defined in target node's inputs (sourceNodeId, sourcePortId)
Default sourceFlowPortId is "output"
For IF_ELSE v2 nodes, use a CONDITIONS parameter ID or "else" as sourceFlowPortId
Example: {"workflowId":"invoice-flow","sourceNodeId":"fetch","targetNodeId":"save","sourceFlowPortId":"output"}
Use when editing a draft. Do not use to activate or run a candidate. Next step: validate, guard, save with workflow_save_version, then call workflow_test_run for a first version. Edits update one open draft; PII can be a warning, but new PII in agent or MCP saves blocks.
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": {
"workflowId": "<workflowId>",
"sourceNodeId": "<sourceNodeId>",
"targetNodeId": "<targetNodeId>"
},
"name": "workflow_add_edge"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The workflow ID | |
| sourceNodeId | Yes | The ID of the source node | |
| targetNodeId | Yes | The ID of the target node | |
| versionLabel | No | Optional label for this version (e.g. "Connected nodes"). If omitted, defaults to "Version N". | |
| sourceFlowPortId | No | The ID of the source output port (default: "output") |