Skip to main content
Glama

edit_image

Modify an existing image using a text prompt: restyle it, combine multiple images, inpaint masked areas, or extend the canvas. Provide image paths and a description to get edited results saved to disk.

Instructions

Edit, restyle, or combine existing image(s) using a text instruction.

Use this for image-to-image work: modify an image, restyle it, composite several inputs into one, inpaint a masked region, or extend / outpaint.

Args: prompt: Instruction describing the desired edit or final result. images: One or more paths to input image files (PNG/JPEG/WEBP, <=50MB each). Multiple images are used together as references / inputs. mask: Optional path to a PNG mask. Transparent areas of the mask mark the region to edit/replace; opaque areas are preserved. model: GPT Image model. Default "gpt-image-2". size: "1024x1024", "1536x1024", "1024x1536", or "auto". quality: "low", "medium", "high", or "auto". n: Number of variations to generate (1-10). output_format: "png", "jpeg", or "webp". output_dir: Where to save. Defaults to $IMAGE_OUTPUT_DIR or ./generated-images. filename: Base filename without extension.

Returns: A text summary with the saved file path(s), followed by the image(s) inline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
maskNo
sizeNoauto
modelNogpt-image-2
imagesYes
promptYes
qualityNohigh
filenameNo
output_dirNo
output_formatNopng
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains essential behaviors such as mask semantics (transparent areas edited, opaque preserved), file size and format constraints, output directory defaulting, and the return format (text summary plus inline images). It lacks explicit statements about side effects (e.g., whether input images are modified), but the described behavior is otherwise comprehensive and non-contradictory.

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?

The description is well-structured with clear sections (purpose, usage, args, returns). Despite its length, each sentence contributes necessary information, and the organization makes it easy to scan. There is no tautology or redundant repetition of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This tool has 10 parameters, no output schema, and no annotations, so the description is the only source of contextual information. It fully covers all parameters, defaults, output directory behavior, and return value, making the tool self-contained for an agent. The explicit mask and output details fill the gap left by the absent schema descriptions.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does. The Args section explains every parameter in plain language, including constraints (n 1-10, size options, image formats, per-file size limit) and crucial semantics like the mask's transparent/opaque behavior. This adds significant meaning beyond the raw property names and types.

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 'Edit, restyle, or combine existing image(s) using a text instruction,' which clearly identifies the action and resource. It immediately distinguishes this tool from generate_image by framing it as image-to-image work and listing specific operations (modify, restyle, composite, inpaint, outpaint).

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

Usage Guidelines4/5

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

The description explicitly provides usage context: 'Use this for image-to-image work' and enumerates concrete scenarios, giving an agent clear signals for when to select this tool. However, it does not explicitly name the alternative tool (generate_image) or state when not to use this tool, so it only partially meets the 'explicit alternatives' criterion.

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/skyjoe66/gpt-image-mcp'

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