Skip to main content
Glama

submit_batch

Enqueue multiple ComfyUI workflows under a single batch ID, with optional parameter sweeps for varied inputs. Returns a batch ID for tracking and output retrieval.

Instructions

Enqueue MANY ComfyUI workflows under one durable batch_id. Provide EITHER workflows (array of API-format workflows) OR one workflow plus a sweep (array of flat input-override sets — each set produces one job, applied to every node that already has that input, like modify_workflow). Reuses the enqueue_workflow path (seeds re-randomized unless disable_random_seed). Returns { batch_id, count, prompt_ids }; the batch_id → prompt_ids mapping is persisted to disk and stays valid across server restarts. Follow with get_batch_status / wait_for_batch / get_batch_output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sweepNoParam sweep: one job per override set, e.g. [{"cfg":6},{"cfg":8,"steps":30}]. Each key is set on every node that already has that input.
workflowNoOne base workflow in API format, used with `sweep`.
workflowsNoArray of ComfyUI workflows in API format (node ID -> {class_type, inputs}). Mutually exclusive with workflow+sweep.
disable_random_seedNoIf true, do not randomize seed values (default randomizes per job).
Behavior4/5

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

With no annotations, the description carries the full burden. It covers key behaviors: durability (persisted across restarts), seed randomization, and reuse of enqueue_workflow path. The sweep behavior is explained. It does not detail authorization or rate limits, but given the tool's nature, this is adequate.

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 front-loaded with the core action and is well-structured. Every sentence adds value, though it could be slightly streamlined. Nonetheless, it is effective and not verbose.

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?

For a tool with no output schema, the description covers return values and persistence. It directs to appropriate follow-up tools. It does not mention error handling or limits, but overall is sufficiently complete given the tool's complexity.

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 100%, baseline 3. The description adds significant meaning: mutual exclusivity of workflows vs workflow+sweep, sweep mechanism, and disable_random_seed effect. This goes beyond the schema, justifying a score above baseline.

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 it enqueues many workflows under a batch_id, and distinguishes between providing an array of workflows or a single workflow with a sweep. It uses specific verbs and resources, and effectively differentiates from siblings like enqueue_workflow.

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?

The description provides clear context on when to use this tool (for batching many jobs) and explains the two input modes. It mentions follow-up tools (get_batch_status etc.), but does not explicitly state when not to use it (e.g., for a single workflow, use enqueue_workflow), though this is implied.

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