update_flow
Change an existing flow: rename it, replace its tags, and/or update node parameters. Provide any combination — one call can do all three. Node parameters are merged with existing values, so specify only what changes; tags replace the existing set. Cannot update a flow that is currently running. This tool does NOT change the graph: to add or remove a node, swap a node's model, or rewire ports, use edit_flow — never create a new flow to restructure an existing one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New name for the flow. | |
| tags | No | Tags to replace all existing manual tags with. JSON array or comma-separated, e.g. '["upscale","4k"]' or 'upscale,4k'. Entries are trimmed. | |
| flow_id | Yes | The unique identifier of the flow to update. | |
| node_updates | No | JSON array of node parameter updates. Each entry has node_id (number) and parameters (object with key-value pairs to set/override). Example: [{"node_id": 1, "parameters": {"scale_factor": 4, "steps": 50}}]. Unspecified parameters keep their current values. An entry for an input node may also (or instead) set include_in_fork (boolean): whether people who fork the flow from a community post or shared link get this input's value. Text inputs are included by default; image, video, audio and file inputs are not, so a fork starts with them empty. Example: [{"node_id": 101, "include_in_fork": true}]. An entry for a model node may also set locked (boolean), the same pin as Studio's result lock: locked=true keeps that node's current result on later runs instead of re-generating it, and also stops the re-run from spreading to what depends only on it. Use it to redo some outputs and keep the rest — lock the nodes whose results are final, then run_flow. A locked node also ignores new inputs and upstream changes: unlock it before running with new input files if its output should follow them. Only a node whose last run finished cleanly with its current parameters can be locked, and update_flow will not change a locked node's parameters: set locked=false in the same entry to unlock and edit it. Put everything for one node in a single entry. get_flow shows locked per node. Example: [{"node_id": 3, "locked": true}]. |