patch_flow
Patch a Node-RED flow incrementally with targeted operations like adding, removing, updating nodes, rewiring, and setting labels, avoiding full-flow updates for small changes.
Instructions
Apply incremental patch operations to a flow.
Fetches the current flow, applies operations, and updates it. Much more efficient than update_flow for small changes.
Args: flow_id: Flow ID to patch operations: JSON array of patch operations. Supported ops: - {"op": "remove_nodes", "ids": ["nodeId1", ...]} - {"op": "add_nodes", "nodes": [{node}, ...]} - {"op": "update_node", "id": "nodeId", "set": {"name": "New", ...}} - {"op": "rewire", "id": "nodeId", "output": 0, "targets": ["id1", ...], "mode": "replace|append"} - {"op": "set_label", "label": "New Name"} - {"op": "set_info", "info": "Description text"} - {"op": "set_disabled", "disabled": true}
Returns: Summary of changes applied.
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": {
"flow_id": "<flow_id>",
"operations": "<operations>"
},
"name": "patch_flow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flow_id | Yes | ||
| operations | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |