Skip to main content
Glama

Edit Image

edit_image
Destructive

Edit an existing image with a text instruction, using Claude Imagine credits. Pass the full-resolution URL of the image to change, plus up to 8 more images when the result should combine them, such as a person placed into a scene, a garment put on a model or a product set in a new setting. Pass them as separate URLs; do not stitch them into one collage. The result is a new image, and the originals are untouched. Say in the prompt what must stay the same, not only what changes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>",
      "image_urls": "<image_urls>"
    },
    "name": "edit_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoEditing model. nano-banana-2 (default), nano-banana-2.1 (new: upgraded layout and text accuracy), gpt-image-2.5 or gpt-image-2.6 (quality levels, and output_format gif animates the source image). The other image models cannot edit through MCP yet.
promptYesWhat to change, and what to keep. Example: "replace the sky with a sunset, keep the people and the framing unchanged"
qualityNogpt-image-2.6 only: rendering quality, low (default, cheapest and fastest), medium or high. Pass it only when the person asks for more detail or a higher quality; it raises the price (quote_generation shows it). Other models have no quality setting.
image_urlsYesPublic URLs of the images, 1 to 9, normally full-resolution URLs returned by earlier generations. Put the image to edit first. Any others are references to draw on, such as a face, a product, a garment or a style. In the prompt, refer to them as image 1, image 2 and so on, in this order, and say what to take from each. The credit price is the same however many images are passed, except on gpt-image-2.6, where each image after the first adds about 1.3 credits.
resolutionNoOutput size: 1k, 2k or 4k. Leave it out unless the user gave a clear size signal: a pixel size or tier (4K, 2K, high resolution) or a physical output (print, poster, wallpaper, billboard). Words like premium, professional or high quality describe the look, not the size, and are not a reason to pass this. Omitted uses the model's default, its cheapest size; 2k and 4k cost roughly two to three times more credits and take longer. When the user asks for 'sharper' or 'bigger' without a size, quote_generation the options and ask which one.
max_creditsNoBudget cap in credits, when the person stated one. If the exact cost of this call is above it, nothing is started and the reply lists what fits.
aspect_ratioNoAspect ratio for the result. When omitted, the framing of the source image is kept.
output_formatNogpt-image-2.6 only: gif makes a short looping animated GIF (9 frames of 512x512, about 1.8 s) from the prompt; describe the motion and that it loops. Leave aspect_ratio and resolution out for a GIF. Omitted or png gives a still image. For an SVG, generate a PNG and call vectorize_image.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / model / description
      Previous value: -"Editing model. nano-banana-2 (default), gpt-image-2.5 or gpt-image-2.6 (quality levels, and output_format gif animates the source image). The other image models cannot edit through MCP yet."New value: +"Editing model. nano-banana-2 (default), nano-banana-2.1 (new: upgraded layout and text accuracy), gpt-image-2.5 or gpt-image-2.6 (quality levels, and output_format gif animates the source image). The other image models cannot edit through MCP yet."
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "nano-banana-2",
      -  "gpt-image-2.5",
      -  "gpt-image-2.6",
      -  "gpt-image-2"
      -]New value: +[
      +  "nano-banana-2",
      +  "nano-banana-2.1",
      +  "gpt-image-2.5",
      +  "gpt-image-2.6",
      +  "gpt-image-2"
      +]
  2. Changed5 schema fields changed
    • changedInput schema / properties / image_urls / description
      Previous value: -"Public URLs of the images, 1 to 9, normally full-resolution URLs returned by earlier generations. Put the image to edit first. Any others are references to draw on, such as a face, a product, a garment or a style. In the prompt, refer to them as image 1, image 2 and so on, in this order, and say what to take from each. The credit price is the same however many images are passed."New value: +"Public URLs of the images, 1 to 9, normally full-resolution URLs returned by earlier generations. Put the image to edit first. Any others are references to draw on, such as a face, a product, a garment or a style. In the prompt, refer to them as image 1, image 2 and so on, in this order, and say what to take from each. The credit price is the same however many images are passed, except on gpt-image-2.6, where each image after the first adds about 1.3 credits."
    • changedInput schema / properties / model / description
      Previous value: -"Editing model. nano-banana-2 (default) or gpt-image-2.5. The other image models cannot edit through MCP yet."New value: +"Editing model. nano-banana-2 (default), gpt-image-2.5 or gpt-image-2.6 (quality levels, and output_format gif animates the source image). The other image models cannot edit through MCP yet."
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "nano-banana-2",
      -  "gpt-image-2.5",
      -  "gpt-image-2"
      -]New value: +[
      +  "nano-banana-2",
      +  "gpt-image-2.5",
      +  "gpt-image-2.6",
      +  "gpt-image-2"
      +]
    • addedInput schema / properties / output_format
      Added value: +{
      +  "description": "gpt-image-2.6 only: gif makes a short looping animated GIF (9 frames of 512x512, about 1.8 s) from the prompt; describe the motion and that it loops. Leave aspect_ratio and resolution out for a GIF. Omitted or png gives a still image. For an SVG, generate a PNG and call vectorize_image.",
      +  "enum": [
      +    "png",
      +    "gif"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / quality
      Added value: +{
      +  "description": "gpt-image-2.6 only: rendering quality, low (default, cheapest and fastest), medium or high. Pass it only when the person asks for more detail or a higher quality; it raises the price (quote_generation shows it). Other models have no quality setting.",
      +  "enum": [
      +    "low",
      +    "medium",
      +    "high"
      +  ],
      +  "type": "string"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / image_urls / description
      Previous value: -"Public URL of the image to edit, normally the full-resolution URL returned by an earlier generation. One image in this version."New value: +"Public URLs of the images, 1 to 9, normally full-resolution URLs returned by earlier generations. Put the image to edit first. Any others are references to draw on, such as a face, a product, a garment or a style. In the prompt, refer to them as image 1, image 2 and so on, in this order, and say what to take from each. The credit price is the same however many images are passed."
    • changedInput schema / properties / image_urls / maxItems
      Previous value: -1New value: +9
  4. Changed1 schema field changed
    • changedInput schema / properties / resolution / description
      Previous value: -"Output size: 1k, 2k or 4k. Omitted means the model's default (its cheapest size). Larger sizes cost more credits; quote_generation shows the exact price."New value: +"Output size: 1k, 2k or 4k. Leave it out unless the user gave a clear size signal: a pixel size or tier (4K, 2K, high resolution) or a physical output (print, poster, wallpaper, billboard). Words like premium, professional or high quality describe the look, not the size, and are not a reason to pass this. Omitted uses the model's default, its cheapest size; 2k and 4k cost roughly two to three times more credits and take longer. When the user asks for 'sharper' or 'bigger' without a size, quote_generation the options and ask which one."
  5. Changed1 schema field changed
    • addedInput schema / properties / resolution
      Added value: +{
      +  "description": "Output size: 1k, 2k or 4k. Omitted means the model's default (its cheapest size). Larger sizes cost more credits; quote_generation shows the exact price.",
      +  "enum": [
      +    "1k",
      +    "2k",
      +    "4k"
      +  ],
      +  "type": "string"
      +}
  6. Changed2 schema fields changed
    • changedInput schema / properties / model / description
      Previous value: -"Editing model. nano-banana-2 (default) or gpt-image-2. The other image models cannot edit through MCP yet."New value: +"Editing model. nano-banana-2 (default) or gpt-image-2.5. The other image models cannot edit through MCP yet."
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "nano-banana-2",
      -  "gpt-image-2"
      -]New value: +[
      +  "nano-banana-2",
      +  "gpt-image-2.5",
      +  "gpt-image-2"
      +]
  7. Changed1 schema field changed
    • addedInput schema / properties / max_credits
      Added value: +{
      +  "description": "Budget cap in credits, when the person stated one. If the exact cost of this call is above it, nothing is started and the reply lists what fits.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
  8. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare openWorldHint, non-idempotent and destructive, so the safety profile is covered. The description adds value beyond that by disclosing that a new image is produced and the originals are left untouched, plus that it spends Claude Imagine credits. There is mild tension between "originals are untouched" and destructiveHint=true, but the destructive cost is credit spend, not data loss, so no real contradiction; the return payload (new image URL, credits charged) is still undisclosed.

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?

Four front-loaded sentences that move from what it does, to how to pass inputs, to what results, to prompt advice. Only minor filler ("using Claude Imagine credits") and no structural waste.

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 an 8-parameter mutation tool with no output schema, the definition covers input mechanics well but never states the return shape (image URL, model used, credits consumed) or how the caller retrieves the result afterwards. The prompt-writing advice is a nice touch, but the output side is left to inference.

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 baseline would be 3. The description earns extra credit by adding cross-parameter guidance the schema does not: image_urls must be passed as separate URLs, never stitched into a collage, and the prompt should preserve-as-well-as-change. It does not address model, resolution or quality selection, which are left entirely to the schema.

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?

States a specific verb (edit) and resource (an existing image) plus the mechanism (text instruction) and credit system. "Edit an existing image" inherently separates it from generate_image, and the multi-image composition clause makes the scope concrete.

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 clear operating context: pass the full-resolution URL, up to 8 additional reference images, pass them separately rather than as a collage, and state in the prompt what must stay the same. It never states the inverse condition (when to call generate_image or vectorize_image instead); the vectorize_image routing only appears in the schema, not the description.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources