Skip to main content
Glama

Edit image

edit_image

Edit or combine images from disk using a text prompt, creating a new output file without altering the source files.

Instructions

Edit or combine existing image file(s) using a text instruction: modify elements, restyle, add or remove content, or merge references. Reads the source image(s) from disk, saves the result as a NEW file (never overwrites sources), and returns the absolute saved path(s).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of images, 1-4 (default 1). Gemini generates sequentially, so n>1 is slower there.
modelNoOverride the model. Gemini: gemini-3.1-flash-image (default), gemini-3.1-flash-lite-image, gemini-3-pro-image, gemini-2.5-flash-image. OpenAI: gpt-image-2 (default, best quality), gpt-image-1.5, gpt-image-1, gpt-image-1-mini. IMPORTANT: gpt-image-2 cannot do transparent backgrounds; pass gpt-image-1.5 when background transparent is needed.
promptYesThe edit instruction, e.g. "make the background transparent" or "restyle as a flat vector logo".
qualityNoOpenAI only, ignored by Gemini. Use low for cheap drafts.
providerNoOverride the default provider. Call list_capabilities to see what is configured.
backgroundNoOpenAI only, ignored by Gemini. transparent yields alpha PNG/WebP, ideal for logos and icons. Requires gpt-image-1.5 or older: gpt-image-2 does not support it, so transparent calls on gpt-image-2 auto-switch to gpt-image-1.5 (noted in the result). Prefer passing model gpt-image-1.5 explicitly when you need transparency.
image_sizeNoGemini 3.x models only (ignored by OpenAI; gemini-2.5-flash-image is fixed at 1024px). Default 1K.
output_pathNoAbsolute path strongly recommended. Either a full file path (.png/.jpg/.webp) or a directory (a slugified filename is derived from the prompt). If omitted: $IMAGE_GEN_MCP_OUTPUT_DIR, then $CLAUDE_PROJECT_DIR, then the server cwd. The server may be restricted to specific directories; call list_capabilities to see allowedDirs.
aspect_ratioNoGemini and OpenAI gpt-image-2 honor the ratio exactly. Older OpenAI models approximate: landscape -> 1536x1024, portrait -> 1024x1536, 1:1 -> 1024x1024.
return_imageNoDefault false. When true, also returns the FIRST image as an inline MCP image block so you can see it without a Read. Large images can exceed the MCP output token limit; for 2K/4K prefer Read on the saved path.
source_pathsYesAbsolute paths to existing input images (.png/.jpg/.jpeg/.webp). The first is the primary edit target; extras act as references. OpenAI accepts up to 16; Gemini works best with 1-3.
input_fidelityNoOpenAI only. high preserves faces, logos, and fine details from the input more faithfully. Ignored on gpt-image-2, which always processes inputs at high fidelity.
Behavior4/5

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

The description adds behavior beyond the annotations: "saves the result as a NEW file (never overwrites sources)" and "returns the absolute saved path(s)." These safety and outcome details are valuable context that annotations (readOnlyHint=false, destructiveHint=false) do not provide. No contradiction with annotations.

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 three sentences: first states the core purpose and allowed operations, second explains input/output behavior, third states the return value. Every sentence earns its place, with no redundancy or filler. It is front-loaded with the most important information.

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?

For a 12-parameter tool with no output schema, the description covers the essential context: what it does, source handling, non-destructive output, and return value. The rich parameter details are already in the schema, so the description is complete without being verbose. Slight gap: it does not mention provider-specific variations, but those are documented in the schema.

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 fully documents all 12 parameters. The description itself does not elaborate on any parameter semantics, but the baseline 3 is appropriate since the structured data carries the burden and does it well.

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 a specific verb+resource: "Edit or combine existing image file(s) using a text instruction," and lists concrete operations (modify, restyle, add/remove content, merge references). This clearly distinguishes it from the sibling generate_image tool, which creates new images rather than editing existing ones.

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 makes it clear the tool is for existing image files ("Reads the source image(s) from disk"), implying the alternative generate_image for new images. However, it does not explicitly state when not to use this tool or name the sibling alternatives, leaving a small gap in explicit guidance.

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/nuver-labs/image-gen-mcp'

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