Skip to main content
Glama
kev489
by kev489

gpt_image_gen

Generate and save images by sending a prompt directly to ChatGPT. Returns file paths and optionally embedded images for analysis.

Instructions

Generate one or more images via ChatGPT image gen and save them to disk.

The prompt is sent directly to ChatGPT — phrase it as an image-generation request and let the prompt itself specify how many images you want.

For running multiple distinct prompts in parallel, use gpt_image_gen_batch instead — it fans out concurrently inside a single MCP call. Issuing two gpt_image_gen calls from one Claude message executes serially because the MCP harness serializes calls to the same server.

Args: prompt: Full image-gen prompt sent directly to ChatGPT. filename_prefix: Stem for saved files. Single image saves as <prefix>.<ext>; multiple images get numbered suffixes (<prefix>-1.<ext>, <prefix>-2.<ext>, ...). Defaults to a hash of the prompt. save_dir: Where to save images. Defaults to <cwd>/generated/ (created if missing). embed_images: When True, the saved images are returned in the tool response so Claude can analyze them. Set False during long iteration loops to keep context light — paths are still returned.

Returns a list of MCP content blocks: a text summary plus, if embed_images is True, the image blobs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
filename_prefixNo
save_dirNo
embed_imagesNo
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: serialization behavior, default save directory, naming conventions for single vs. multiple images, and the effect of embed_images on the response. No contradictions.

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 well-structured with separate paragraphs for the core function, usage notes, and parameter details. It is reasonably concise, though the details about naming and defaults could be slightly more streamlined.

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?

Given zero schema coverage, no output schema, and no annotations, the description covers the return format (list of MCP content blocks, text summary, optional images) and key defaults. It lacks explicit output schema, but the qualitative description suffices for the agent.

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%, so the description must add meaning for all parameters. It explains prompt, filename_prefix (default naming), save_dir (default location), and embed_images (response impact). This fully compensates for the lack of schema descriptions.

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: 'Generate one or more images via ChatGPT image gen and save them to disk.' It uses a specific verb and resource, and distinguishes from the sibling tool gpt_image_gen_batch which handles parallel distinct prompts.

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 explicit guidance on when to use this tool versus gpt_image_gen_batch (parallel runs), and notes that sequential calls via the MCP harness are serial. However, it does not explicitly contrast with the search siblings.

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