Skip to main content
Glama

Edit Image

edit_image

Transform existing images by applying prompt-based edits to 1–4 local reference files. Use it to modify or restyle images and save results as new files.

Instructions

Transform existing images with flux-2-klein image-to-image (NaN API). Use generate_image instead when starting from text alone. Takes 1 to 4 local reference files (PNG, JPEG or WebP, each under 25MB), saves the result under NAN_OUTPUT_DIR (default ~/nan-mcp-output) without overwriting anything, and returns the saved path and the temporary source URL. Counts against the shared account image quota (100/month, flux-2-klein and qwen-image-2.1).

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

Input Schema

NameRequiredDescriptionDefault
nNoNumber of images to generate (1-4). Default 1
seedNoBase seed for reproducibility
sizeNoImage size "WxH" divisible by 16, e.g. 1024x1024, 1536x1024, 1024x1536. Default 1024x1024
imagesYesAbsolute paths to reference image files (PNG, JPEG, WebP; up to 4, each < 25MB)
promptYesDescription of the edit or transformation to apply
guidanceNoFLUX guidance scale
outputNameNoOptional base name for the output file(s)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.8
    • addedInput schema / properties / images / maxItems
      Added value: +4
    • addedInput schema / properties / images / minItems
      Added value: +1
  2. First observedv1.0.6

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and delivers: where output goes (NAN_OUTPUT_DIR, default ~/nan-mcp-output), the no-overwrite guarantee, what is returned (saved path plus temporary source URL), and that calls consume a shared 100/month quota with the sibling model. These are exactly the mutation, side-effect, and cost details an agent cannot get from structured fields.

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?

Four tight sentences, front-loaded with purpose and the alternative before side effects and quota. There is mild redundancy in repeating the file format/size limit that the schema already states, but no wasted sentences overall.

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, yet the description covers return values, filesystem destination, overwrite behavior, resource limits, and quota accounting. For a 7-parameter image-edit tool, an agent has everything needed to call it correctly and anticipate costs.

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 100%, so every parameter is already documented, and the description mostly restates the images constraint (formats, count, 25MB cap) rather than adding new meaning. It says nothing extra about seed, guidance, size, or outputName beyond the schema's own text, so the baseline of 3 applies.

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 and resource ("Transform existing images") plus the exact model used (flux-2-klein image-to-image) and immediately distinguishes itself from generate_image. An agent can tell which of the two image tools to reach for without opening either 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 names the alternative and the condition that selects it: "Use generate_image instead when starting from text alone." That is a direct when-to-use/when-not rule, so nothing about tool selection is left to inference.

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