Skip to main content
Glama

modify_workflow

Apply operations like adding, removing, or connecting nodes to modify a ComfyUI workflow. Returns updated JSON and new node IDs.

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

TableJSON Schema
NameRequiredDescriptionDefault
workflowYesComfyUI workflow JSON (as a JSON string or object)
operationsYesArray of operations to apply in order. Each has an 'op' field: set_input, add_node, remove_node, connect, or insert_between
Behavior3/5

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

No annotations are provided, so the description carries full burden. It states operations are applied and returns modified workflow JSON and new node IDs, but doesn't clarify if the original workflow is mutated, whether operations are atomic, or any side effects. Moderate transparency.

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?

Description is two sentences: first states purpose and lists operations, second states return value. No unnecessary words, front-loaded with key information. Highly concise.

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

Completeness4/5

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

Given no annotations and no output schema, the description covers the main purpose, operations, and return values. However, it lacks usage context (when to use, preconditions) and error handling details, which are reasonable gaps for a modification tool. Still fairly complete.

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

Parameters3/5

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

Schema coverage is 100%, so the input schema already details each operation and their required fields. The description lists operation types but adds minimal extra meaning beyond what schema provides. Baseline score of 3 is appropriate.

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 clearly states it modifies an existing ComfyUI workflow, lists specific operations (set_input, add_node, etc.), and indicates the return value. This distinguishes it from siblings like create_workflow or analyze_workflow.

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

Usage Guidelines2/5

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

The description does not specify when to use this tool versus alternatives. For example, it doesn't differentiate from save_workflow, lock_workflow, or other workflow-related tools. No guidance on prerequisites or context is provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/artokun/comfyui-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server