Skip to main content
Glama

Edit an image

edit_image

Change one thing about an image already in the account, keeping everything else. This is the studio's refine: the picture itself is the input, so instruction says only what changes and the rest of the frame is carried by the source's own pixels. Use this — never a second generate_image with a reworded prompt — whenever someone asks for the same picture with something different about it. Re-prompting rolls the dice again and returns a different composition, different lighting, different everything; this returns the same picture with the change applied, and files it as the next version of the original. The source's model, aspect ratio and setting are inherited unless you override them, and a source made by a model that cannot read a reference image is moved onto one that can. Costs a normal image generation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
settingNo
instructionYesOnly what changes — "cowboy hats instead of caps", "warmer light". Do not restate the original prompt: the picture is the input, and describing it again competes with what the model can already see.
aspect_ratioNo
generation_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes
generationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / generation / properties / ready_in_seconds
      Added value: +{
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / generation / required
      Previous value: -[
      -  "generation_id",
      -  "kind",
      -  "status",
      -  "model",
      -  "prompt",
      -  "aspect_ratio",
      -  "refined_from",
      -  "caption_style",
      -  "output_url",
      -  "credits_cost",
      -  "error",
      -  "vendor_phase",
      -  "stalled",
      -  "created_at",
      -  "app_url"
      -]New value: +[
      +  "generation_id",
      +  "kind",
      +  "status",
      +  "model",
      +  "prompt",
      +  "aspect_ratio",
      +  "refined_from",
      +  "caption_style",
      +  "output_url",
      +  "credits_cost",
      +  "error",
      +  "vendor_phase",
      +  "stalled",
      +  "ready_in_seconds",
      +  "created_at",
      +  "app_url"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / aspect_ratio / enum
      Previous value: -[
      -  "1:1",
      -  "1:4",
      -  "1:8",
      -  "2:3",
      -  "3:2",
      -  "3:4",
      -  "4:1",
      -  "4:3",
      -  "4:5",
      -  "5:4",
      -  "8:1",
      -  "9:16",
      -  "16:9",
      -  "21:9"
      -]New value: +[
      +  "1:1",
      +  "1:2",
      +  "1:4",
      +  "1:8",
      +  "2:1",
      +  "2:3",
      +  "3:2",
      +  "3:4",
      +  "4:1",
      +  "4:3",
      +  "4:5",
      +  "5:4",
      +  "8:1",
      +  "9:16",
      +  "16:9",
      +  "21:9"
      +]
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "seedream-5-lite",
      -  "nano-banana-2.1",
      -  "nano-banana-2",
      -  "gpt-image-2.5-flare",
      -  "gpt-image-2.5-sunburst",
      -  "gpt-image-2",
      -  "nano-banana-2-lite",
      -  "seedream-5-pro",
      -  "flux-2-flex",
      -  "flux-2-pro",
      -  "flux-2-max",
      -  "grok-imagine-image",
      -  "grok-imagine-image-quality"
      -]New value: +[
      +  "seedream-5-lite",
      +  "nano-banana-2.1",
      +  "nano-banana-2",
      +  "gpt-image-2.5-flare",
      +  "gpt-image-2.5-sunburst",
      +  "gpt-image-2",
      +  "nano-banana-2-lite",
      +  "seedream-5-pro",
      +  "flux-2-flex",
      +  "flux-2-pro",
      +  "flux-2-max",
      +  "grok-imagine-image",
      +  "grok-imagine-image-quality",
      +  "krea-3",
      +  "qwen-image-3-pro"
      +]
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover only safety flags, and the description adds genuinely new behavioral facts: the result is filed as the next version of the original, model/aspect ratio/setting are inherited unless overridden, a source made by a model that cannot read a reference image is silently migrated to one that can, and it costs a normal image generation. These are non-obvious consequences an agent should know before invoking.

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 sentences, front-loaded with the core meaning before routing and inheritance details. There is mild redundancy — the idea that 'the picture is the input' is stated twice — but each sentence still earns its place.

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?

An output schema exists, so return values need no explanation. Between the routing rule, the instruction-authoring guidance, the inheritance/defaulting behavior, the model-migration caveat and the cost note, nothing an agent needs to call this correctly is missing.

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 only 20%, so the description must carry the load, and it does for `instruction` ('says only what changes', don't restate the prompt) and for the inheritance semantics of `model`, `aspect_ratio` and `setting`. `generation_id` is only implied via 'the picture itself is the input' and 'the source', leaving its role slightly less explicit, but the overall gap is well covered.

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 opening sentence gives a precise verb and resource ('Change one thing about an image already in the account, keeping everything else') and immediately frames it as the studio's refine step. It distinguishes itself explicitly from the most confusable sibling, generate_image, so an agent can route without opening either schema.

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

Usage Guidelines5/5

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

The description states when to use it and names the anti-pattern directly: 'Use this — never a second generate_image with a reworded prompt — whenever someone asks for the same picture with something different about it.' It also explains why the alternative fails (different composition/lighting), which is a concrete selection criterion rather than vague guidance.

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