modify_workflow
Modify a ComfyUI workflow by setting inputs, adding, removing, or connecting nodes, and inserting nodes between existing ones. Returns the updated workflow JSON with IDs of new nodes.
Instructions
Apply modification operations to an existing ComfyUI workflow. Supports: set_input, add_node, remove_node, connect, insert_between. Returns the modified workflow JSON and IDs of any newly added nodes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflow | Yes | ComfyUI workflow JSON (as a JSON string or object) | |
| operations | Yes | Array of operations to apply in order. Each has an 'op' field: set_input, add_node, remove_node, connect, or insert_between |