Skip to main content
Glama

edit_image

Transform or inpaint an existing image using a text prompt, optional mask, and reference images; returns an async result or job ID for polling.

Instructions

Edit/transform an image: init_image (img2img/inpaint) or ref_images (edit). Asynchronous, like generate_image (waits <= ~30s, otherwise job_id).

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

Input Schema

NameRequiredDescriptionDefault
maskNoPath to the mask (inpaint)
seedNo
stepsNo
widthNo
heightNo
promptYes
profileNo
samplerNo
strengthNo
cfg_scaleNo
init_imageNoPath to the image (or base64/dataURL)
ref_imagesNoReference images (edit)
wait_secondsNoSeconds to wait (0..30, default 20)
negative_promptNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior4/5

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

With no annotations present, the description carries the burden and does disclose non-obvious behavior: the call is asynchronous, blocks for roughly 30 seconds, and returns a job_id when it does not finish in time — critical for the agent to know a second poll via get_job may be needed. It omits failure behavior, cost/latency beyond the timeout, and permission requirements.

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?

Two tight clauses, front-loaded with the operation and its two modes, followed by the async timing note. No filler; density is high, though the extreme terseness contributes to the parameter coverage gap.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A 14-parameter mutation-style tool with no annotations and no output schema needs substantially more than two sentences: the return shape is only hinted at (job_id), mode exclusivity between init_image and ref_images is unstated, defaults for strength/steps/width are absent. The async note is helpful but insufficient for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 29%, so the description needed to compensate, and it only clarifies the role of init_image and ref_images (and indirectly mask via 'inpaint'). Roughly ten parameters — seed, steps, width, height, profile, sampler, strength, cfg_scale, negative_prompt, wait_seconds — get no semantic help beyond the schema's bare names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Edit/transform an image') and splits the operation into two named modes, init_image (img2img/inpaint) and ref_images (edit). It implicitly separates itself from generate_image by naming it as the async reference point, but never explicitly says why an agent would pick this over generate_image or upscale_image.

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

Usage Guidelines3/5

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

The mode hints ('img2img/inpaint' vs 'edit') imply when each input path applies, and the mask parameter reinforces the inpaint case. However there is no explicit when-to-use/when-not guidance relative to the siblings generate_image and upscale_image, so the agent must infer the boundary.

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