Skip to main content
Glama

execute_workflow_sync

Submit a ComfyUI workflow and wait for execution to complete with real-time progress, returning prompt_id, status, and outputs. Use it to run workflows synchronously and retrieve generated files.

Instructions

Submit a ComfyUI workflow and wait until execution completes with real-time progress (WebSocket if available, polling fallback). Returns prompt_id, status (completed/failed/timeout), and outputs. When status is error, still check outputs — if present, use download_output or get_last_output to retrieve files. When timeout_ms is omitted, uses recommended_timeout_ms from get_system_resources (higher on MPS/Apple). Requires COMFYUI_HOST.

Input Schema

NameRequiredDescriptionDefault
workflowYesWorkflow JSON string (from build_workflow or loaded file)
timeout_msNoMax wait in milliseconds. When omitted, uses get_system_resources recommended_timeout_ms (e.g. 1.2M on MPS).
stream_progressNoStream progress updates via WebSocket (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly succeeds: it discloses blocking behavior, WebSocket-with-polling-fallback transport, the three terminal statuses, the COMFYUI_HOST requirement, and the counterintuitive 'error but outputs present' case. It omits what happens to a still-running workflow on timeout and whether the job can be interrupted.

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?

Four sentences, front-loaded with the verb and blocking semantics, then the return shape, then the error-path guidance, then the timeout default. No filler or restatement of the name.

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?

The description names the returned fields (prompt_id, status, outputs) and covers the error and timeout paths, which compensates for the absent output schema. Remaining gaps are minor: no indication of how large outputs are referenced or what a timeout leaves behind on the server.

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 all three parameters are already documented in the schema, including the timeout_ms default source and the stream_progress default of true. The description's timeout explanation largely repeats the schema text rather than adding new meaning, so the baseline 3 applies.

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?

The description opens with a specific verb+resource ('Submit a ComfyUI workflow') and adds the decisive scoping trait that it blocks until completion. It does not explicitly name the sibling alternatives execute_workflow or execute_workflow_stream, so the agent must infer the distinction between sync and streaming variants.

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?

It gives actionable guidance on the error path ('when status is error, still check outputs — use download_output or get_last_output') and explains the timeout_ms fallback to get_system_resources. It does not say when to prefer this over execute_workflow_stream, which is the most relevant alternative given the sibling list.

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