Skip to main content
Glama

run_workspace

Queues the active ComfyUI graph for execution, mirroring the browser's Queue Prompt, and mirrors progress events or returns the prompt_id for async monitoring.

Instructions

Press Queue Prompt in the browser and watch the run from here.

The tab queues its own canvas, unsaved edits and all, so everything reacts the way it does when the button is clicked by hand: nodes light up, progress bars fill, sampler previews appear, and the result lands in the node that produced it. Nothing is written to the workflows directory. Use this when the user is working on a graph in front of them; use run_workflow for a file.

It has to be the tab that queues. ComfyUI addresses execution events to whoever submitted the job, and the frontend only tracks jobs it queued itself, so a graph submitted from here leaves the canvas reporting someone else's run. The events are copied back to this server so progress is still reported; if that copy cannot be set up the run still happens and progress_mirrored says it did not, which is the one case where get_progress goes quiet.

Two consequences of it being the real button. Widget callbacks run, so a seed set to randomize advances on its own - no two runs are alike unless the canvas says so. And the graph is not rewritten on the way out: a PreviewImage stays a PreviewImage and its result lands in temp/, which ComfyUI clears on restart. Change the node itself with set_workspace_values to keep it.

There is no params argument on purpose: set_workspace_values makes the edit, reports what changed from and to, and leaves it as one Ctrl+Z. Folding that into a run would hide an edit to the user's canvas inside a call that reads as read-only, and spend GPU minutes before anyone had seen the change.

Muted and bypassed nodes are dropped when the graph is converted, so a muted SaveImage produces no output at all. get_workspace_graph lists both under issues, which is worth a look when a run finishes with nothing to show.

Args: wait: wait for the run to finish. When False, returns the prompt_id immediately and keeps watching in the background, so get_progress(prompt_id) reports steps as they happen. Prefer this for anything slow - waiting blind is what makes a caller mistake a working generation for a hung one. timeout: seconds to wait before giving up on a running job. client_id: which tab to run; defaults to the most recently focused one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNo
timeoutNo
client_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description takes full responsibility for behavioral disclosure. It covers side effects (no writes to workflows directory), event mirroring behavior, widget callback execution (random seeds advance), graph non-rewriting, muted/bypassed node handling, and the rationale for omitting a params argument. This is exceptionally transparent and prevents surprising behavior.

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 each paragraph contributes essential information about a tool with complex runtime behavior. The opening sentence is front-loaded with the primary action, and the structure (overview, behavioral nuances, rationale, args) is logical. Slightly verbose but every sentence earns its place.

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 no annotations, the description covers all essential context: usage timing, side effects, edge cases (progress_mirrored failure, muted nodes), parameter semantics, and interaction with sibling tools. It even accounts for the output schema indirectly by referencing progress reporting. No critical gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description's Args section fully compensates. Each parameter (wait, timeout, client_id) is explained with its effect, default, and behavioral implications (e.g., wait=false returns prompt_id and continues background watching). This far exceeds the bare schema.

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, concrete action ('Press Queue Prompt in the browser and watch the run from here') and immediately differentiates from the sibling tool run_workflow ('Use this when the user is working on a graph in front of them; use run_workflow for a file'). This makes the tool's purpose unmistakable and contextually framed.

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?

Explicit usage guidance is provided: when to use this tool versus run_workflow, and when to use set_workspace_values instead of passing params. It also advises preferring wait=false for slow runs to avoid mistaking a working generation for a hung one, giving clear decision rules for parameter choices.

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/pytraveler/local-comfyui-mcp'

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