Skip to main content
Glama

run_workflow

Execute a ComfyUI workflow with a workflow ID and parameters to generate images, returning results or a running job ID when completion takes longer.

Instructions

Execute a ComfyUI workflow with the specified parameters. Returns generated images.

Input Schema

NameRequiredDescriptionDefault
seedNoRandom seed for reproducibility. -1 for random seed.
timeoutNoSeconds to wait before returning status "running" (default and max: 50). Only used when wait_for_completion=true.
parametersYesWorkflow-specific parameters (prompt, lora_name, aspect_ratio, etc.)
workflow_idYesThe workflow ID to execute
filename_prefixNoStrongly recommended: a clear, descriptive name for this generation that becomes the actual ComfyUI output filename (e.g. "raccoon-boardroom-ceo", "product-hero-shot-blue"). Use cohesive, human-readable markers so related images group together and are easy to find later. Reuse the same base name across a series, varying a suffix (e.g. "-v2", "-wide"), to keep a batch coherent. Avoid generic or auto-generated names. If omitted, falls back to a generic "Comfy-<workflow>" prefix, which makes outputs hard to identify.
wait_for_completionNoWait for workflow completion (default: true). Waits at most 50s per call; longer jobs (video, cold model loads) return status "running" with a prompt_id to pass to get_job_result. If false, returns immediately.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries full burden but only discloses that it returns generated images. The long-running/async behavior, timeout semantics, and the prompt_id hand-off to get_job_result live in the schema, not the description. The single return-value sentence is the main added context.

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?

Two compact sentences with no waste, front-loading the action. It is arguably too terse for a tool with async behavior and nested parameters, but it is efficient and well-structured.

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 6-parameter tool with a nested parameters object, no output schema, and eight siblings, the description is thin. It omits the critical async workflow (running status, prompt_id, resuming via get_job_result) that an agent needs to use this correctly, leaving that entirely to the schema.

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 description coverage is 100%, so all six parameters including seed, timeout, filename_prefix, and wait_for_completion are already well documented. The description adds nothing beyond the schema, so the baseline 3 is appropriate.

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 ('Execute') and resource ('ComfyUI workflow') and mentions the return value (generated images). It is distinguishable from siblings like get_job_result or cancel_job, though it doesn't explicitly name them.

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

Usage Guidelines3/5

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

The description offers no explicit guidance on when to call this versus get_job_result or list_workflows. The async-resume pattern is only inferable from the wait_for_completion schema field, not the description itself.

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