Skip to main content
Glama

Edit with multiple references

edit_images

Modify image 1 using up to nine ordered reference images and a prompt telling what to take from each and where to place it. Preserves its aspect ratio unless dimensions are set.

Instructions

Edit image 1 with the help of other images (up to 10 in all) and an instruction, e.g. put the product from image 2 in the hand of the person in image 1. Order matters: refer to them as image 1, image 2, ... in the prompt. The output follows image 1's aspect ratio unless width/height or aspect_ratio are given. For a new scene that only uses the images as references, use generate_image with reference_images.

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_paths": "<image_paths>",
      "prompt": "<prompt>"
    },
    "name": "edit_images"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoSeed for reproducible results; omit or -1 for random. Never reuse the seed the source image was generated with: use a different one or omit it
widthNo
heightNo
promptYesThe edit instruction, written by you in English and used as is (Kokon does not rewrite it): image 1 is the image being changed; start with Place or Combine, say what is taken from each image (image 2, image 3...) and exactly where it goes in image 1, with matching light and shadows, and end with 'Keep everything else in image 1 unchanged.'
qualityNoAll run Qwen-Image 2.1 Turbo (8 steps): fast = ~1 MP (the default, fastest); balanced = ~1.5K; quality = native 2K (slowest; edits share 2K with their references)
image_pathsYesReference images in order; refer to them as image 1, image 2, ... in the prompt
output_pathNoOptional destination (absolute, or relative to the project). Must be inside the project or the app output folder. Existing files are never overwritten; a numbered name is used instead.
aspect_ratioNoAspect ratio such as 1:1, 4:3, 3:4, 16:9, 9:16, or auto (inferred from the prompt)
include_previewNoAlso return a small JPEG preview in the tool result. Default false: images stay local and are not sent to the model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.10.2
    • changedInput schema / properties / prompt / description
      Previous value: -"e.g. 'Use the person from image 1, the clothing from image 2 and the lighting of image 3'"New value: +"The edit instruction, written by you in English and used as is (Kokon does not rewrite it): image 1 is the image being changed; start with Place or Combine, say what is taken from each image (image 2, image 3...) and exactly where it goes in image 1, with matching light and shadows, and end with 'Keep everything else in image 1 unchanged.'"
    • changedInput schema / properties / seed / description
      Previous value: -"Seed for reproducible results; omit or -1 for random"New value: +"Seed for reproducible results; omit or -1 for random. Never reuse the seed the source image was generated with: use a different one or omit it"
  2. First observedv0.9.3

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent, so the safety profile is covered. The description adds genuinely useful behavior beyond them: output inherits image 1's aspect ratio unless width/height/aspect_ratio are given, and the ordering of references is semantically meaningful. It could still say more about what is returned, but include_preview and output_path in the schema carry much of that.

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?

Three tight sentences: capability, the critical ordering constraint, the default output sizing rule, then the sibling routing. Nothing is wasted and the most important constraint appears early.

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 a 9-parameter generation tool with no output schema, the description covers the semantically load-bearing parts: reference ordering, output dimensions, and the alternative tool. The return shape is only implicit (via include_preview/output_path descriptions), but that is a minor gap given the rich schema.

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%, so the schema already documents most parameters thoroughly, including the detailed prompt recipe and seed warning. The description reinforces the ordering semantics of image_paths and the aspect-ratio inheritance rule, but largely restates what the schema says. Baseline 3 is appropriate.

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 image 1 with the help of other images') and clarifies the multi-reference model with a concrete example. It explains how it differs from generate_image, but never distinguishes itself from the sibling edit_image (singular), leaving the agent to infer that difference from names alone.

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?

Explicitly routes the agent: for a new scene that only uses references, use generate_image with reference_images. It also gives a usage example that shows the intended operating mode. It stops short of a full when/when-not treatment against edit_image, so not a 5.

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