Skip to main content
Glama

run_workflow

Queue a ComfyUI workflow and wait for completion to return status, node errors, output file references, and an inline preview thumbnail. Validate workflow execution and save results directly to a specified directory.

Instructions

Queue the workflow and (by default) wait for completion. Returns status, node errors if it failed, output file refs, and an inline preview thumbnail so you can SEE the result (view_output fetches full size / other outputs). wait=False returns {status: queued, prompt_id} immediately - poll get_run_status(prompt_id). Prove a workflow works before saving/delivering.

allow_invalid=True submits even when the local validator reports errors (ComfyUI is the final judge; use it if a valid graph is being wrongly blocked). save_dir (or, when empty, the configured COMFYUI_MOUNT_DIR) relocates every finished image out of ComfyUI's output tree into a folder the caller can reach, returning saved_paths - so a render is presentable in one call without a separate save_output step.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNo
save_dirNo
workflow_idYes
allow_invalidNo
return_previewNo
timeout_secondsNo
Behavior5/5

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

Annotations indicate readOnlyHint=false, openWorldHint=true, destructiveHint=false. The description adds valuable behavioral details: waiting behavior, preview thumbnail in response, save_dir relocation, and allow_invalid submission. It does not contradict annotations and provides context beyond structured fields.

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?

The description is fairly concise for the amount of detail, with front-loaded main action. Each sentence adds value, but it could be slightly shorter. Structure is logical: main behavior, then wait=False, allow_invalid, save_dir.

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 6 parameters and no output schema, the description covers return values (status, errors, refs, preview, saved_paths) and key behaviors. It misses explicit mention of return_preview control and timeout_seconds, but overall is complete enough for effective use.

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 0%, so description carries the burden. It explains wait, allow_invalid, save_dir, and implicitly return_preview (via preview thumbnail). It does not mention workflow_id (obvious) or timeout_seconds. Overall, it covers 4 of 6 parameters well, adding meaning beyond the schema titles.

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 the tool queues a workflow and waits for completion, returning status, errors, output refs, and a preview thumbnail. It distinguishes itself from siblings like create_workflow, get_run_status, view_output, and save_output by emphasizing 'Prove a workflow works before saving/delivering' and noting that save_dir eliminates the need for a separate save_output step.

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?

Provides clear guidance: use to prove a workflow works; if wait=False, poll get_run_status; allow_invalid for local validator errors. It implies alternatives like view_output for full outputs and save_output if save_dir not used. However, it could explicitly state when not to use this tool versus diagnose_workflow or lint_workflow.

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/EnragedAntelope/comfy-draftsman'

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