Skip to main content
Glama

edit_flow

Destructive

Change the STRUCTURE of an existing flow in place: add or remove nodes, swap the model on a node, and connect or disconnect ports. This is the tool for "add an upscaler to this flow", "use a different model here", "rewire this" — do NOT create a new flow to modify one that already exists (update_flow only changes name, tags and node parameters). All operations in one call are applied together: either every one lands or none does. Read the flow with get_flow first to get node IDs, and get_model for port layouts before wiring.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flow_idYesThe unique identifier of the flow to edit.
operationsYesJSON array of operations, applied as one batch. Each entry has an "op" field: - {"op":"add_node","model_id":"SISR-PiSA-SR","parameters":{"steps":30}} — parameters are optional; the new node's ID is assigned by the server and reported back - {"op":"delete_node","node_id":3} — connections to and from the node go with it - {"op":"replace_model","node_id":3,"model_id":"VideoUpscaling-SeedVR2-3B"} — migrates compatible parameters and keeps the edges only when the two models' ports match; the response says whether they were kept - {"op":"connect","out_node_id":3,"out_port_index":0,"in_node_id":4,"in_port_index":0} - {"op":"disconnect","out_node_id":3,"out_port_index":0,"in_node_id":4,"in_port_index":0} Port indices are positions in that model's own input/output list and differ between models — read them from get_model. An input port takes exactly one source, so connect a port that is already wired only after disconnecting it in the same call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With annotations marking the tool as destructive (destructiveHint: true) and not read-only, the description adds significant behavioral context: it emphasizes that all operations in one call are applied atomically (all or nothing), which is a key behavioral trait not in the annotations. It also mentions that delete_node cascades to connections and that connect requires disconnecting existing wires, which are important side effects. This goes beyond what annotations provide, warranting a 4.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized for a complex toolcase. It is front-loaded with the core purpose ('Change the STRUCTURE of an existing flow'), followed by operational details. Each sentence earns its place—no filler, and it uses clear structuring with bullet-like examples for operations. The length is justified by the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (5 operation types, multiple parameters), the description is remarkably complete. It covers prerequisites (get_flow, get_model), batch semantics, port constraints, model swapping behavior, and contrasts with the sibling tool. The schema itself provides the operation syntax, so the description adds the necessary context for an agent to call the tool correctly without additional research.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% coverage, so baseline is 3. The description adds substantial value by explaining the semantic meaning of each operation type, the structure of the operations array, and the nuances like port indices being model-specific and that input ports take exactly one source. It also clarifies that new node IDs are server-assigned and reported back, which is not in the schema. This exceeds baseline, justifying a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Change the STRUCTURE of an existing flow in place' and enumerates the exact operations (add/remove nodes, swap models, connect/disconnect ports). It clearly distinguishes itself from update_flow, which only changes name, tags, and node parameters. This leaves no ambiguity about the tool's purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool versus creating a new flow and names update_flow as the alternative for non-structural changes. It also instructs to read the flow with get_flow first to get node IDs and to use get_model for port layouts before wiring, which is critical for correct usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources