Skip to main content
Glama

Edit Image

edit_image

Edit an existing local PNG/JPEG using natural-language instructions and a reference image to keep the result close to the original. Queue variations and reproduce edits with exact seeds.

Instructions

Edit an existing local image with Qwen Image 2.1. Pass the file path and an instruction such as 'remove the Chinese text and keep the rest unchanged'. The source image is used as a reference, so the result stays close to the original. Reusing a generation seed does not edit a picture; use this tool instead. Queues the job(s) and returns immediately with prompt_ids and seeds; then call get_result with the prompt_ids to wait for and receive the image paths. The returned seed is a decimal string; pass it back exactly to reproduce the same edit.

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": {
      "image_path": "<image_path>",
      "prompt": "<prompt>"
    },
    "name": "edit_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoSeed as a decimal string. Reuse the exact seed from a previous edit to reproduce it.
countNoNumber of edit variations to generate, from 1 to 4
promptYesEdit instruction describing what to change and what to keep
image_pathYesAbsolute or project path to the PNG or JPEG to edit
negative_promptNoOptional things to avoid, such as text, letters, or watermarks

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the source image is used as a reference so output stays close to the original, that the call queues jobs and returns immediately rather than blocking, and that seeds are decimal strings that must be passed back exactly. Remaining gaps are failure/rate-limit behavior and whether revisions or originals are ever overwritten.

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?

Front-loaded with purpose, then reference behavior, sibling routing, async contract, and seed reproduction — each sentence adds distinct operational value with no filler or repetition.

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?

No output schema exists, and the description compensates fully by describing the immediate return (prompt_ids and seeds) and where the actual image paths come from (get_result). File constraints are covered by the schema, so nothing an agent needs to invoke 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 coverage is 100%, so baseline is 3, but the description adds real meaning: the seed round-trip contract (returned as decimal string, reuse verbatim to reproduce an edit) and an illustrative prompt. It does not discuss count or negative_prompt, leaving those 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+resource ('Edit an existing local image'), names the underlying model, and explicitly separates itself from generate_image by noting that reusing a generation seed does not edit a picture. An agent can distinguish this from both siblings without opening a 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?

Explicitly says when to use this instead of generate_image, and prescribes the follow-up flow: call get_result with the returned prompt_ids. It even gives a concrete instruction example ('remove the Chinese text and keep the rest unchanged') to shape input.

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

Deploy Server

Other Tools