Skip to main content
Glama

edit_image

Edit local images with a multipart Images Edits API, save results to a new absolute path, and preserve originals. Poll the returned job ID with get_job.

Instructions

Edit local images using the provider multipart Images Edits API. Saves to a new absolute path; preserves originals. Optional mask follows provider semantics. Poll returned job ID with get_job.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of images; defaults to 1. May increase provider charges.
sizeNoProvider-supported size: auto or WIDTHxHEIGHT. Omit to use the provider default. Actual dimensions are returned.
modelYesExact model ID from list_models. Never invent or silently replace it.
promptYes
qualityNoProvider-supported quality, e.g. auto, low, medium, high, xhigh, max. Omit unless needed; availability varies by model.
mask_pathNoAbsolute local mask path. Follow provider requirements for transparency, dimensions and format.
backgroundNo
input_pathsYesAbsolute paths to 1–16 local PNG/JPEG/WebP reference images; provider limits may be lower.
output_pathYesAbsolute output filename inside the current user workspace. Prefer output/imagegen/. Extension .png, .jpg, .jpeg or .webp selects output_format. Existing files are never overwritten. For n>1, -1, -2, etc. are appended.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Adds real behavioral context beyond annotations: originals are preserved, output goes to a new absolute path, and the call returns a job ID requiring polling via get_job. Annotations already cover readOnly/destructive/idempotent, so the description's job is supplementary and it delivers async-job and non-overwrite behavior.

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?

Four tightly packed sentences, each carrying a distinct fact (API used, output/preservation behavior, mask note, polling instruction). Fully front-loaded with no waste.

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?

For an async, 9-parameter, open-world image-edit tool with no output schema, the description covers the key agent needs: it is async, results come via job ID, originals are safe, and where output lands. It could mention cost/charge implications (n increases charges, per schema) but the essentials are present.

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

Parameters3/5

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

Schema description coverage is 78%, above the threshold where the schema does the heavy lifting. The description adds only a hint about mask semantics, not compensating detail beyond the schema's already-rich parameter docs.

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 (local images), names the underlying API used, and distinguishes itself from generate_image by the editing/mask semantics. An agent can tell precisely what this does.

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?

The description routes the agent forward: 'Poll returned job ID with get_job' tells the agent what to do after invocation, and mentions optional mask usage. It does not explicitly contrast with generate_image (when to edit vs generate), which is the main gap.

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