Skip to main content
Glama
ex-takashima

OpenAI GPT-Image MCP Server

by ex-takashima

generate_image

Generate an image from a text prompt with OpenAI GPT models. Choose from multiple model versions for speed, cost, or resolution up to 4K.

Instructions

Generate a new image from a text prompt using OpenAI GPT image models. Supports gpt-image-1, gpt-image-1.5 (4x faster/cheaper, better text), and gpt-image-2 (flexible sizes up to 4K). Automatically calculates and reports token usage and cost.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesThe text prompt describing the image to generate
output_pathNoOutput file path (default: generated_image.png)
modelNoModel to use. gpt-image-2: latest, flexible sizes up to 4K (3840/2160 experimental), no transparent_background. gpt-image-1.5: 4x faster, 20% cheaper, supports input_fidelity. gpt-image-1: original. (default: gpt-image-1)
sizeNoImage size. gpt-image-1/1.5 only support 1024x1024, 1024x1536, 1536x1024, auto. gpt-image-2 also supports 2K/4K presets plus custom WxH (16px multiples, each edge ≤3840, ratio ≤3:1). 3840x2160/2160x3840 are experimental. (default: auto)
qualityNoImage quality level (default: auto)
output_formatNoOutput image format (default: png)
transparent_backgroundNoEnable transparent background (PNG only, default: false). Not supported by gpt-image-2.
moderationNoContent moderation level (default: auto)
sample_countNoNumber of images to generate (1-10, default: 1)
return_base64NoReturn base64 image data in response (default: false)
include_thumbnailNoInclude thumbnail preview in MCP response for LLM recognition (default: false, overrides OPENAI_IMAGE_THUMBNAIL env var)
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses use of OpenAI models, automatic token/cost calculation, and multiple model capabilities. However, it does not mention overwrite behavior for output_path, rate limits, or authorization needs.

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 two sentences, front-loaded with purpose and model list. No unnecessary words, but the model details could be more structured. Still, it is efficient and clear.

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?

The tool has no output schema, so the description should explain return values. It mentions optional base64 and thumbnail but does not clarify the default return (presumably saved file path and token usage?). While model details are good, the output behavior is incomplete.

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 schema already describes all parameters. The description adds modest value by summarizing model version differences and auto-calculation of costs, but this information is largely redundant with the enum descriptions in the schema.

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 generates images from text prompts using specific OpenAI models. It distinguishes itself from siblings like edit_image and transform_image by focusing on generation from scratch.

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

Usage Guidelines3/5

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

The description provides model selection guidance but does not explicitly state when to use this tool versus alternatives like start_generation_job (async vs sync). The model descriptions help choose among models but no explicit when-not or sibling differentiation beyond model choice.

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/ex-takashima/openAI-gpt-image-1-MCP-SERVER'

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