Skip to main content
Glama

openai_image_edit

Edit images or compose scenes from up to 16 reference images using text prompts, with optional masks or markup overlays, then save the results to a chosen output directory.

Instructions

Edit images or compose from up to 16 reference images (OpenAI images.edit), optionally guided by a mask or markup overlay. Saves files to output_dir and returns their paths.

Input Schema

NameRequiredDescriptionDefault
nNoNumber of images, 1-10
sizeNoauto, 1024x1024, 1536x1024, 1024x1536, or WIDTHxHEIGHT (both multiples of 16, aspect 1:3 to 3:1, max 3840x2160). For GIF this is the size of each frame; keep it small (e.g. 512x512) to fit the pixel budget
extraNoExtra API params shallow-merged into the request last, e.g. {"complexity":"high"}
modelNoImage model (default gpt-image-2.6-flare). e.g. gpt-image-2.6-flare (fast), gpt-image-2.6-sunburst (detail/precise edits), gpt-image-2.5-flare, gpt-image-2.5-sunburst
promptYesEdit instructions
qualityNoauto (default), low, medium, high, xhigh, max
mask_pathNoOptional PNG mask, same size as the first image (transparent = area to edit). Cannot combine with markup_path
backgroundNoauto (default), opaque, transparent (transparent needs png, webp or svg)
complexityNoPlanning effort, separate from quality: low, medium, high (2.6 default high)
moderationNoauto (default), low
output_dirYesAbsolute directory to save images in. Follow your workspace conventions: the current project folder if any, else your own tmp dir.
frame_countNoGIF only: number of frames (default 9; SDK says 2-16, guide says 2-64). Describe the motion and a return to the starting pose in the prompt for a smooth loop
image_pathsYesLocal paths of one or more input/reference images
markup_pathNoOptional transparent PNG overlay with marks/arrows/notes drawn on it, same size as the first image, to guide the edit. Cannot combine with mask_path
output_formatNopng (default), jpeg, webp; generate also supports gif (animated) and svg
input_fidelityNohigh or low; gpt-image-1.5 / 1-mini only, omit for gpt-image-2 and later
frame_duration_msNoGIF only: ms per frame, 20-2000, rounded to 10 (default 200)
safety_identifierNoOptional stable hashed end-user id for OpenAI abuse monitoring
output_compressionNo0-100, jpeg/webp only

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations at all, the description carries the full behavioral burden and does disclose the key trait that it writes files to disk and returns their paths. However, for a 19-parameter mutation tool it says nothing about overwrite behavior for existing filenames, required credentials, latency/cost, or failure modes — meaningful gaps when no annotations cover the mutation profile.

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, both front-loaded with the operation and then the output behavior. There is no filler, no restatement of parameters, and no redundancy with the schema.

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?

It correctly covers the return semantics ('returns their paths') in the absence of an output schema, which is important given 19 parameters and file output. But the description is thin for a tool this complex: it omits file-overwrite behavior, credential prerequisites, and the relationship to the generate sibling, leaving real gaps for an agent preparing a call.

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 description coverage is 100%, so the schema already documents nearly all 19 parameters and a baseline of 3 would be defensible. The description still adds value beyond the schema by stating the 'up to 16 reference images' cap (the schema only specifies minItems: 1 with no maximum) and by framing mask/markup as optional guidance mechanisms.

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?

The description names a specific verb and resource ('Edit images or compose from up to 16 reference images'), identifies the underlying API (images.edit), and adds scoping detail (mask or markup overlay, files saved to output_dir). It is clear what the tool does, though it never explicitly contrasts itself with the sibling openai_image_generate beyond the implicit edit-vs-generate distinction.

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?

Usage is only implied: the agent can infer this is for transforming existing images rather than creating new ones. There is no explicit statement of when to choose this over openai_image_generate, nor any guidance on preconditions (e.g. images must exist locally) beyond what the schema states.

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