Skip to main content
Glama

edit_image

Modify existing images via text prompts: remove/replace backgrounds, add/remove objects, restyle, extend canvas, or combine images. Provide image links and a model; optional mask for precise edits.

Instructions

Change existing images with an instruction: remove or replace the background, add or remove things, restyle, extend the canvas (outpaint), change the framing, or combine several images. Give https links to the images (links returned by this server work). Good models: "bfl/flux-kontext-pro", "openai/gpt-image-2", "google/gemini-3-pro-image". Pass mask_url (white = area to change) for precise edits with models that take one, e.g. "bfl/flux-pro-1.0-fill".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of results (image-only models). Default 1.
modelYesImage model id from list_models with type "image"
promptYesWhat to change, e.g. "remove the background, keep the product"
mask_urlNohttps link to a mask image (white = change, black = keep)
image_urlsYeshttps links to 1–4 input images
estimate_onlyNoOnly return the estimated price from AI Gateway's list prices. Nothing is started or charged.
size_or_aspectNoAspect ratio like "16:9" or size like "1024x1024". Support varies by model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose input constraints (https links, links from this server are valid) and mask color semantics, but says nothing about cost, credit consumption, whether the call is synchronous or queued, or whether edits are non-reversible. Useful but incomplete for a paid generation endpoint.

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

Conciseness4/5

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

Front-loaded with the core purpose, then practical usage details, then parameter hints. Every sentence carries information; the model-id list is slightly dense but directly actionable rather than filler.

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 exists, yet the description covers inputs, model selection, and mask usage, and the schema documents all seven parameters. The remaining gap is behavioral: nothing about latency, async behavior, or billing, which an agent invoking a paid image edit would benefit from knowing.

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 the baseline is 3, but the description adds value beyond it: it names specific model ids to use for model, and clarifies the mask convention (white = area to change) and the models that accept a mask, which the schema only states generically.

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?

Names a specific verb (change/edit) and resource (existing images) and enumerates the concrete edit operations supported: background removal/replacement, add/remove objects, restyle, outpaint, reframe, and multi-image combine. The word 'existing' plus the operation list separates it cleanly from the sibling generate_image.

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?

Gives actionable guidance: supply https links (and notes that links returned by this server work), recommends concrete good models, and explains when to pass mask_url with which model. It does not explicitly state the negative case (use generate_image for brand-new images), so it stops short of a 5.

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