Skip to main content
Glama

execute_chain

Run multiple ComfyUI workflows in sequence, passing output images between steps (e.g., txt2img → upscale → img2img). Supports saved workflow names, per-step params, and stop-on-error.

Instructions

Execute a chain of workflows in sequence. Each step runs after the previous completes. Use inputFrom and outputTo to pass the output image from one step to the next (e.g. txt2img → upscale → img2img). Steps can use workflow JSON or saved workflow name. Prefer saved workflow name (string) for large workflows to avoid ENAMETOOLONG in some clients. Requires COMFYUI_HOST.

Input Schema

NameRequiredDescriptionDefault
stepsYesChain steps
timeout_msNoPer-step timeout (default 300000)
stop_on_errorNoStop chain on first failure (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses sequencing behavior, the data-passing mechanism, and the COMFYUI_HOST prerequisite, but says nothing about blocking/long-running behavior, what is returned per step (images? JSON?), or how partial failures surface beyond the stop_on_error flag name.

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

Conciseness4/5

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

Compact and front-loaded: the core action comes first, then mechanics, then the environment caveat. Every sentence contributes, though the inputFrom/outputTo sentence is dense enough that it could be split for readability.

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

Completeness3/5

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

For a tool with no annotations and no output schema, the description covers inputs well but never describes the return value — an agent cannot tell whether it gets per-step outputs, a final image reference, or a job id. Given the chaining complexity, that omission leaves a real gap.

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?

Schema coverage is already 100%, yet the description still adds value: it explains the inputFrom/outputTo pairing concretely with an example and recommends the string form of `workflow` for large payloads. It stops short of explaining step indexing conventions (zero-based) or the outputNode/outputIndex selection, but that meaning is largely in the schema.

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

Purpose4/5

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

States a specific verb and resource ('Execute a chain of workflows in sequence') and immediately clarifies the chaining semantics ('Each step runs after the previous completes'). This implicitly distinguishes it from execute_workflow and execute_batch, but no sibling is named explicitly, so an agent must infer the boundary itself.

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

Usage Guidelines4/5

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

Gives a clear usage context via the concrete example pipeline (txt2img → upscale → img2img) and a practical hint to prefer saved workflow names for large workflows to avoid ENAMETOOLONG. It lacks explicit 'when not to use this vs execute_batch' guidance, so it falls short of a 5.

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