Skip to main content
Glama
s4shibam

Image Gen MCP

by s4shibam

generate_image_openai

Generates OpenAI images and saves them to disk. Provide prompts, filenames, model, and an absolute output directory to create assets for your app or website.

Instructions

Generate one or more images with OpenAI's Image API and save them to disk.

Use this when the user (or your plan) needs OpenAI-generated assets for a website or app. Pass the OpenAI image model id (e.g. gpt-image-2, gpt-image-1.5, gpt-image-1, dall-e-3), a list of prompt + filename pairs, the required absolute_output_directory, and optional settings: size, quality, background, output_format.

Notes:

  • size: standard GPT sizes are 1024x1024, 1536x1024, 1024x1536, or auto; gpt-image-2 also allows arbitrary WIDTHxHEIGHT (divisible by 16).

  • quality: low/medium/high/auto for GPT image models; standard/hd for dall-e-3.

  • background: transparent/opaque/auto; transparent is unsupported on gpt-image-2 and requires png or webp.

  • output_format: png, jpeg, or webp (GPT image models only).

Images are written only to absolute_output_directory. It must be an absolute path; relative paths are rejected. Each file is named: {filename}-openai-{model}-{timestamp}.{ext}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoImage size as WIDTHxHEIGHT or "auto". GPT image models: 1024x1024, 1536x1024, 1024x1536, or auto. gpt-image-2 also supports arbitrary sizes (both sides divisible by 16, aspect ratio 1:3-3:1, max 3840x2160). dall-e-2: 256x256, 512x512, 1024x1024. dall-e-3: 1024x1024, 1792x1024, 1024x1792.
modelYesOpenAI image model id. GPT image models: gpt-image-2, gpt-image-1.5, gpt-image-1, gpt-image-1-mini, chatgpt-image-latest. Also dall-e-2, dall-e-3.
imagesYesList of images to generate (prompt + filename)
qualityNoRendering quality. auto (default) picks the best for the model. GPT image models: low, medium, high. dall-e-3: standard, hd. dall-e-2: standard only.
backgroundNoBackground for GPT image models that support it: transparent, opaque, or auto (default). transparent requires png or webp. gpt-image-2 does not support transparent — use opaque or auto.
output_formatNoOutput format for GPT image models only: png (default), jpeg, or webp.
absolute_output_directoryYesRequired absolute directory path where generated images will be saved. Relative paths are rejected.
Behavior3/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It discloses key behaviors: only absolute output directories are accepted, relative paths rejected, the file naming pattern, and writes confined to the absolute_output_directory. However, it doesn't describe what happens on failure, whether generations are synchronous, API cost implications, or the return value/format. For a generation tool handling disk writes and API calls, some richer operational detail would help.

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-organized with a clear summary paragraph followed by a bulleted parameter guide. The front-loaded purpose sentence is strong. The parameter notes are genuinely useful (size constraints, quality enums per model, background constraints). It's slightly verbose but every sentence earns its place, given the complex cross-parameter constraints.

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?

This is a complex tool: 7 params, model-specific constraints, disk-writing behavior, and nested images array. The description and rich schema (100% coverage) together cover the input side well. No output schema exists, so the description should note return behavior, which it does partially ('written to output directory', file naming). It doesn't state whether it returns success status, generated URLs, or file paths, which is a minor gap for API-integration workflows.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3 even with minimal description-level parameter info. The description does add helpful cross-parameter constraints (e.g., transparent background requires png/webp, gpt-image-2 doesn't support transparent, quality varies by model family) that go beyond individual parameter schemas. These relational constraints add value, though the schema already documents most per-parameter details thoroughly.

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 specific verb+resource: 'Generate one or more images with OpenAI's Image API and save them to disk.' It clearly states the tool's function and scope (website/app assets), and distinguishes it from the sibling generate_image_gemini by explicitly naming 'OpenAI's Image API'. The model list in the description further differentiates it from the Gemini sibling.

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?

The description gives explicit usage context: 'Use this when the user (or your plan) needs OpenAI-generated assets for a website or app.' This clearly signals the when-to-use scenario and implicitly distinguishes from the Gemini alternative. While it doesn't name generate_image_gemini explicitly as an exclusion, the OpenAI-specific framing makes the selection obvious.

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/s4shibam/image-gen-mcp'

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