Skip to main content
Glama
ex-takashima

OpenAI GPT-Image MCP Server

by ex-takashima

edit_image

Edit images using inpainting with OpenAI GPT models. Apply edits to transparent areas of a mask while preserving faces and logos with adjustable fidelity.

Instructions

Edit an existing image using inpainting with OpenAI GPT image models. Requires a reference image and optional mask image (transparent areas are edited). gpt-image-1.5 supports input_fidelity for better face/logo preservation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesDescription of the desired edits
reference_image_base64NoBase64 encoded reference image
reference_image_pathNoPath to reference image file
mask_image_base64NoBase64 encoded mask image (transparent areas will be edited)
mask_image_pathNoPath to mask image file (transparent areas will be edited)
output_pathNoOutput file path (default: edited_image.png)
modelNoModel to use. gpt-image-2: latest, flexible sizes, input_fidelity is auto-high (field ignored). gpt-image-1.5: 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). (default: auto)
qualityNoImage quality level (default: auto)
output_formatNoOutput image format (default: png)
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)
input_fidelityNoInput fidelity for preserving faces/logos. gpt-image-1.5 only (gpt-image-2 is always high, gpt-image-1 unsupported). High uses more tokens. (default: low)
Behavior4/5

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

No annotations, so description carries full burden. Discloses inpainting method, need for reference image, optional mask (transparent areas edited), model-specific input_fidelity behavior, default model. Missing edge cases like handling of multiple inputs, but key behaviors covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no wasted words. Front-loaded with purpose, followed by key behavioral detail. Efficient and clear.

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?

No output schema, but description covers key aspects: input requirements, model differences, optional mask. Could include return value format, but for 15-param tool with 100% schema coverage, it's nearly complete.

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 coverage is 100%, so baseline 3. Description adds value by explaining model-specific behavior for input_fidelity and mask semantics ('transparent areas are edited'). Provides context beyond what schema gives.

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?

Description clearly states 'Edit an existing image using inpainting' with specific verb and resource. Distinguishes from siblings like generate_image (creates new) and transform_image (different operation). High clarity.

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?

No explicit when-to-use or when-not-to-use guidance. Usage is implied (for editing existing images with inpainting), but no contrast with sibling tools like generate_image or start_generation_job. Baseline implied usage.

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