Skip to main content
Glama

Edit image (OpenAI)

edit_image

Edit or combine existing images by applying a text prompt, such as placing a product from one image onto another image's background. Use an optional mask to target specific areas.

Instructions

Edit or combine existing images with a prompt (e.g. "put the product from image 1 on the background from image 2"). Optional mask: transparent pixels mark the area to change. Results are saved to disk.

Input Schema

NameRequiredDescriptionDefault
nNoNumber of images (1–10). Default 1.
maskNoMask image (same forms as images). PNG with alpha; same size as the first image.
sizeNo"auto", "1024x1024", "1536x1024" (landscape), "1024x1536" (portrait). gpt-image-2 and 2.5 models also accept any WIDTHxHEIGHT: multiples of 16, aspect 1:3–3:1, max 3840x2160 (e.g. "1920x1088", "3840x2160").
modelNoOpenAI image model. Known: gpt-image-2.5-flare, gpt-image-2.5-sunburst, gpt-image-2, gpt-image-1.5, chatgpt-image-latest, gpt-image-1-mini. Dated snapshots (e.g. gpt-image-2-2026-04-21) also work. Default: gpt-image-2.5-flare. Call list_models for capabilities.gpt-image-2.5-flare
imagesYes1–16 input images: local file paths (png/jpg/webp), http(s) URLs, data URLs, or OpenAI file IDs.
promptYesWhat to generate. Describe style in the prompt.
qualityNoDefault "auto". xhigh and max are only on gpt-image-2.5-flare / -sunburst.
backgroundNo"transparent" needs output_format png or webp.
moderationNo"low" = less restrictive filtering.
output_dirNoWhere to save files. Default /root/Pictures/openai-image-mcp.
output_formatNoDefault png.
include_imagesNoAlso return the images inline so the client can display them. Large; off by default.
input_fidelityNoHow closely to preserve input details/faces. gpt-image-1.5: low|high; gpt-image-1-mini: low; omit for gpt-image-2+.
filename_prefixNoFile name prefix. Defaults to a slug of the prompt.
output_compressionNo0–100, jpeg/webp only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, so the mutation and external-call profile is known. The description adds real value with "Results are saved to disk" and the mask transparency semantics, but says nothing about cost, latency, moderation implications, or whether returned file paths are handed back to the agent.

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?

Three short sentences, front-loaded with purpose, then the optional mask caveat, then the output side effect. Nothing is padded and nothing is buried.

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?

For a 15-parameter tool with no output schema, the description covers purpose, mask behavior, and where files land, but omits what the tool actually returns (paths? inline images? count?) and how to choose between models or sizes. The rich schema carries most of the weight, leaving the description adequate but thin for this complexity.

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 coverage is 100% and every one of the 15 parameters is already documented in the schema, so the baseline is 3. The one genuine addition is the mask rule ("transparent pixels mark the area to change"), which explains effect rather than just format, but the remaining parameters (model, size, quality, n) get no guidance in the description beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Edit or combine existing images") and reinforces it with a concrete multi-image example, which clearly signals it operates on existing inputs rather than generating from nothing. It never names generate_image as the contrast case, so the split between the two siblings is left implicit rather than stated.

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 composite example ("put the product from image 1 on the background from image 2") illustrates one usage pattern, implying when to reach for this tool. However there is no explicit when-not, no prerequisites (API credentials, cost, latency), and no statement of how this differs from generate_image despite it being the obvious alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools