Skip to main content
Glama

edit_image

Edit one image or compose a new image from 2-4 references by giving instructions. Specify the base and supporting images to replace backgrounds, insert subjects, or modify details with a self-hosted model.

Instructions

Edit one image, or compose a new image from 2-4 reference images.

    model: which image model to use; omit for the configured default. Currently available: "qwen21".
    images: 1-4 local file paths (or data:/base64 strings). ORDER MATTERS: the first image is
    the base/subject and sets the output canvas (unless width/height are given); it is fitted and
    padded, never stretched. Later images are supporting references at ~1 MP.
    instruction: start with the operation ("Replace the background with…", "Put the person from
    <image1> into the scene from <image2>…"). Say what comes from each reference, what must stay
    recognizable and what must change. For placing a subject into a scene: subject FIRST, scene
    SECOND, with explicit <image1>/<image2> roles.
    Other parameters and the return value match generate_image.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cfgNo
saveNo
seedNo
countNo
modelNo
stepsNo
widthNo
heightNo
imagesYes
negativeNo
instructionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly explains how the first image sets the output canvas, is fitted and padded (never stretched), and that later images are supporting references at ~1 MP. It also notes that width/height can override the canvas and defers other behavior to generate_image. This gives valuable insight into image handling, though it does not cover error cases or rate limits.

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?

The description is long but well-structured, using indented bullet points for model, images, and instruction. Each line adds value, and the most important usage detail (image order and instruction format) is front-loaded. Some redundancy exists (e.g., repeating the instruction example), but it is justified by complexity. It is not overly verbose for an 11-parameter tool.

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?

Given 11 parameters, no annotations, and no output schema, the description needs to be comprehensive. It covers the essential parameters and signals that the return value matches generate_image. However, it does not explain the remaining parameters or the exact structure of the output, relying on a sibling tool for those details. An agent cannot fully understand the tool's behavior without consulting generate_image, which introduces a dependency.

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 coverage is 0%, so the description must compensate. It thoroughly explains the three most critical parameters: model (available options), images (order, path/base64, role), and instruction (operation-first, explicit roles). However, it does not describe cfg, save, seed, count, steps, negative, width, or height individually, instead deflecting all of them to 'match generate_image.' This cross-reference is helpful only if that sibling's description is equally thorough, making the current tool incomplete on its own.

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 description opens with a clear, specific statement: 'Edit one image, or compose a new image from 2-4 reference images.' This establishes the verb (edit/compose), resource (image), and a distinct capability that separates it from the sibling generate_image (text-to-image). The inclusion of concrete operation examples reinforces the purpose without ambiguity.

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 provides explicit operational guidance on how to structure the instruction parameter, including role ordering for subject/scene composition. It implies when to use (when you have an existing image to edit or combine) and naturally distinguishes from generate_image by focusing on reference images. However, it does not explicitly name generate_image as the alternative for text-only generation or state when NOT to use this tool, so it falls short of a 5.

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