Skip to main content
Glama

batch_generate

Submit multiple prompts as a single batch to ComfyUI, applying shared parameters, optional per-job randomization, and unique seeds to run bulk image generation jobs.

Instructions

Submit batch jobs with optional per-generation randomization.

Args: prompts: List of positive prompt strings (one per job) shared_params: Static parameters applied to all generations randomize: Per-generation randomization specs (override shared_params) Supports: scalar, [min, max] range, choice pool, "random"/"random_unsafe" deduplicate_seeds: Ensure unique seeds across all jobs in this batch priority: Queue priority hint ("high" | "normal")

Returns: Batch metadata with batch_id, total_jobs, queued_jobs, job_ids

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompts": "<prompts>"
    },
    "name": "batch_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptsYes
priorityNonormal
randomizeNo
keep_loadedNo
shared_paramsNo
deduplicate_seedsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and falls short. It hints at queueing via "priority: Queue priority hint" and "queued_jobs", but never says whether submission is asynchronous, what limits exist on prompt count, or what happens on partial failure; the ffwew"Returns" block largely restates information already in the output schema.

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?

Docstring-style Args/Returns layout is front-loaded with the one-line purpose and compact per-parameter lines. The Returns section is somewhat redundant given an output schema exists, but overall little waste.

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

Completeness3/5

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

For a six-parameter job-submission tool with no annotations, the definition covers most parameters and states the return shape, and an output schema exists to cover returns. It stops short by omitting keep_loaded and by not describing job lifecycle (e.g., following up with get_job_status) or batch-size constraints.

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 description coverage is 0%, so the description must compensate and mostly does: it explains prompts, shared_params, deduplicate_seeds, priority, and gives concrete randomization syntax (scalar, [min, max], choice pool, "random"/"random_unsafe") with the override relationship to shared_params. The keep_loaded parameter is never mentioned, leaving one of six undocumented.

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?

"Submit batch jobs with optional per-generation randomization" gives a specific verb (submit) and resource (batch jobs) plus a distinguishing capability. It does not differentiate itself from the sibling batch_generate_ipadapter, so an agent must infer which batch tool to pick from the name alone.

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

Usage Guidelines2/5

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

The definition never states when to prefer this over generate_image for a single image or batch_generate_ipadapter for adapter-based batches, and offers no prerequisites or exclusions. Usage is only implied through the parameter list.

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