Skip to main content
Glama

queue

Inspect and manage ComfyUI execution queue: list running/pending jobs, check status by prompt_id, reorder, edit, cancel, or clear jobs.

Instructions

Inspect and manage the ComfyUI execution queue. Driven by the action parameter:

  • action:"list" — The job running now plus all pending jobs, each with its prompt_id and position. Read-only; requires a reachable ComfyUI server (works against local or remote --comfyui-url). Omits queued workflow payloads by default to keep output small; set include_workflows:true when you need to inspect or edit the exact pending payload. Use this before action:"cancel" (running), action:"cancel_queued"/action:"clear" (pending), action:"move", or action:"edit".

  • action:"status" — Check ONE job by its prompt_id (the id returned by enqueue_workflow). Queries the connected ComfyUI server; requires it to be running. Returns JSON with running, pending, and done booleans, plus optional status_str, error details, and execution_stats from ComfyUI history once the job is done. Also returns text_outputs when the workflow contained text-preview nodes (Preview as Text, ShowText, …) — those produce no image file, so this is the ONLY way to read their result; report that text back to the user. Use action:"list" to see the whole queue at once, and get_history for full output filenames.

  • action:"get_workflow" — The full workflow payload for one PENDING queue item by prompt_id. Read-only. Does not work for the currently running job because ComfyUI cannot safely edit a job after execution starts.

  • action:"move" — Move a PENDING queue item to the front or back by removing it and re-enqueuing its saved workflow payload; position ("front"|"back") is required. The job receives a NEW prompt_id; the old prompt_id is removed. Running jobs cannot be moved.

  • action:"edit" — Edit a PENDING queue item by removing it and re-enqueuing an updated workflow. Provide either a complete replacement workflow or node_inputs patches keyed by node id; position selects where to requeue (default back). The job receives a NEW prompt_id; the old prompt_id is removed. Running jobs cannot be edited.

  • action:"cancel" — Stop the CURRENTLY RUNNING job ROBUSTLY. Sends an interrupt, then WAITS and verifies the job actually stopped — ComfyUI only honors interrupts BETWEEN steps, so a long single step (e.g. a high-res video sampler) can ignore a plain cancel. If the interrupt isn't honored it escalates to freeing VRAM (POST /free) and re-checks; if it STILL won't die it reports the job as WEDGED and tells you to restart_comfyui (an HTTP cancel cannot kill a stuck step). Set clear_pending:true to also drop ALL pending jobs in the same call — the correct "reset the queue" action, since cancelling alone leaves pending jobs that would run next. The partial result is discarded. With prompt_id given, only interrupts the running job when its prompt_id matches; omit to interrupt whatever is currently running. Use action:"cancel_queued" to remove one specific PENDING job instead.

  • action:"cancel_queued" — Remove one specific PENDING job from the queue by prompt_id. Does not affect running jobs.

  • action:"clear" — Clear ALL pending jobs from the queue. Does not affect the currently running job.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhich queue operation to perform. "list" and "clear" take no other parameters; "status", "get_workflow" and "cancel_queued" require `prompt_id`; "move" requires `prompt_id` + `position`; "edit" requires `prompt_id` (optional `workflow`/`node_inputs`/`position`); "cancel" takes an optional `prompt_id` and `clear_pending`.
positionNoWhere to requeue the job. REQUIRED for action:"move". OPTIONAL for action:"edit" — defaults to back.
workflowNoaction:"edit" — optional complete replacement API-format workflow. If omitted, the existing queued workflow is patched with `node_inputs`.
prompt_idNoThe prompt_id of a job (the id returned by enqueue_workflow). REQUIRED for actions "status", "get_workflow", "move", "edit" and "cancel_queued" (a PENDING queue item for all but "status"). OPTIONAL for action:"cancel" — if given, only interrupts the running job when its prompt_id matches; omit to interrupt whatever is currently running.
node_inputsNoaction:"edit" — optional input patches keyed by node id, e.g. {"3":{"steps":30,"cfg":7}}.
clear_pendingNoaction:"cancel" — also clear ALL pending jobs (recommended when resetting after a stuck/slow render, so a re-queue doesn't stack behind a backlog). Default false.
include_workflowsNoaction:"list" — include each running/pending job's workflow payload and extra_data. Can be large.
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It thoroughly describes side effects (e.g., jobs receiving a NEW prompt_id when moved/edited), cancellation escalation with interrupt, VRAM freeing, and WEDGED reporting, and clarifies that partial results are discarded. It also distinguishes read-only actions ('list', 'get_workflow') from mutating ones, and explains the default omission of workflow payloads in list output.

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 long but structured as a bulleted list per action, front-loaded with a one-sentence purpose. It is appropriately sized given the tool's complexity (8 actions, multiple edge cases). While every sentence earns its place, the overall length is near the upper bound; a more condensed version could improve scannability without losing critical details.

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

Completeness5/5

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

Despite having no output schema, the description covers return behaviors for key actions: status returns JSON booleans plus optional execution_stats and text_outputs, list returns prompt_id and position, and get_workflow returns the full payload. It also addresses the important edge case of text-preview nodes producing no image file, and directs users to get_history for full output filenames. The description is complete enough for an agent to use the tool effectively.

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 the baseline is 3. The description adds some contextual nuance (e.g., position defaults to back for edit, clear_pending recommended when resetting after a stuck render, include_workflows to keep output small), but most parameter meanings are already well-documented in the schema. The extra context is useful but not transformative beyond what the schema already conveys.

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 opens with a clear statement: 'Inspect and manage the ComfyUI execution queue.' It uses a specific verb ('inspect and manage') and resource ('execution queue'), and the action enum further distinguishes it from sibling tools like enqueue_workflow, get_history, and restart_comfyui. Each action is explicitly named and scoped, leaving no ambiguity about what the tool does.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance, e.g., 'Use this before action:"cancel"', 'Use action:"list" to see the whole queue at once, and get_history for full output filenames', and contrasts cancel vs cancel_queued vs clear. It also states exclusions like 'Running jobs cannot be moved' and 'Does not affect the currently running job', making it clear when not to use certain actions.

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