Skip to main content
Glama
kev489
by kev489

gpt_image_gen_batch

Execute multiple image generation prompts simultaneously via ChatGPT, allowing concurrent processing and independent failure handling.

Instructions

Run multiple image-gen prompts in parallel via ChatGPT image gen.

Each request opens its own ChatGPT tab and runs concurrently with the others. This is how you actually parallelize image gen — issuing multiple separate gpt_image_gen tool calls from a single Claude message gets serialized by the MCP harness, but a single gpt_image_gen_batch call fans out internally and bypasses that.

Each item in requests is a dict with keys:

  • prompt (required, str): the full image-gen prompt

  • filename_prefix (optional, str): stem for saved files; falls back to a hash of the prompt

  • save_dir (optional, str): override save location for this item; defaults to <cwd>/generated/

embed_images is batch-level — applies to all items. Set False during long iteration loops to keep Claude's context light.

All items run concurrently, capped at 3 ChatGPT tabs at a time server-wide; larger batches queue internally. If one fails, the others still complete; failed items show up in the response as [<prefix>] FAILED: <error>.

Account-level rate limits may still apply under sustained concurrency.

Returns a list of MCP content blocks: per-item text summaries plus, if embed_images is True, the image blobs in order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestsYes
embed_imagesNo
Behavior5/5

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

Discloses key behaviors: concurrent execution capped at 3 tabs, queueing for larger batches, error handling (one fails, others complete), rate limit caveat, and batch-level embed_images behavior. No annotations provided, but description fully compensates.

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?

Description is informative without being overly verbose. Each sentence adds value, though slightly longer than necessary. Front-loaded with purpose and key usage note.

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?

Given no output schema and two parameters, the description covers all necessary context: parallel execution details, error behavior, return format (list of MCP content blocks with text and optionally images), and rate limits.

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?

Adds rich meaning beyond schema: details each key in requests (prompt, filename_prefix, save_dir) and the batch-level embed_images flag. Schema coverage was 0%, so description carries full burden and executes well.

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 the tool's purpose: 'Run multiple image-gen prompts in parallel via ChatGPT image gen.' It distinguishes from sibling gpt_image_gen by explaining parallelization advantage over serialized calls.

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?

Explicitly says when to use this tool over alternatives: 'This is how you actually parallelize image gen... issuing multiple separate gpt_image_gen tool calls... gets serialized... gpt_image_gen_batch fans out internally.' Also advises setting embed_images to false during long loops.

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/kev489/gpt-tool-use'

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