Skip to main content
Glama

edit-image

Edit existing images with one instruction while keeping identity, pose, angle, and style; restyle Foundry VTT tokens, portraits, props, battlemaps, and overland maps.

Instructions

Edit an existing image with one instruction while keeping identity, pose, angle, and style. Flash for every kind (pro was no better at fixes and re-cropped once). Tokens are prompted light (your instruction as you would type it in the Gemini app, plus a keep-face/hair/angle line and "remove any cast shadow"), put back on a chroma plate keyed to the token's own colours, and cut to alpha on the 512 square in the same call. "give this an updated painterly style" restyles a world token in place; a token from any library or a capture of your own is restyled the same way, its pose and camera kept. Every token and portrait edit is counted by a judge model (heads, eyes, limbs, hands and fingers, tails, tendrils, held objects, and a token's facing) against an optional anatomy line from the book; the result reports anatomy: what it found, each flaw placed in the picture, and for a token the rotation that brings its front to the top. Props (kind "prop") get object-only wording (no figures added) and come back cut at the source file's exact pixel size, ready for the same tile slot. Battlemaps (kind "battlemap") restyle a bought map with the layout locked: the result lands on the source's pixel grid (a whole-number upscale when the source is small), is checked for drift against the source (a drifted render is redone once, then refused), and comes with a checkerboard image of source and result to eyeball. A dressing pass (dressing: true, battlemaps only) adds furniture and props, which the check reads as moved layout, so it renders once and reports drift without retrying or refusing. Overland maps (kind "overland") repaint a regional or world map the same way, painted bare of every name, marker, road, compass rose and scale bar (letter them on afterwards), with a looser drift check that refuses only a grossly moved geography. Returns the new file path, dimensions, and estimated spend.

Input Schema

NameRequiredDescriptionDefault
kindYesPurpose preset. icon: 1:1 flash → 512 square. prop: a map prop (furniture, barrel, tree) seen straight down, object only, cut to alpha at its tile size (300 px per grid cell; an edit keeps the source size). token: 1:1 flash, top-down full body on a chroma plate, cut to alpha on a 512 square (1024 for creatureSize: "large"), no shadow (framing, plate, and cut are done for you). portrait: 3:4 at 2K. illustration: 16:9 at 4K → 2560×1600 (16:10 crop). battlemap (edit-image only): restyle a bought map with its layout locked, delivered on the source's pixel grid (a whole-number upscale for a small source), drift-checked. overland (edit-image only): repaint a regional or world map on the same grid, bare of every name and symbol, with a looser drift check. Every kind defaults to flash; tier: "pro" is opt-in and needs confirmPro.
slugYesKebab-cased into the filename: <kind>-<slug>-<id>.png.
tierNoDefault flash (Nano Banana 2.1, ~3-11¢), never needs a confirm. "pro" (Nano Banana Pro, ~13-24¢, style-reference slots, stronger multi-figure scenes) needs confirmPro.
anatomyNoTokens and portraits only: what the creature should have, in one line from the Monster Manual ("two arms, two legs, one large eye, no tail"; "a mushroom with exactly four tendrils and no limbs"). Every token and portrait render is shown to the judge model, which counts heads, eyes, limbs, hands and fingers, tails, tendrils and held objects, flags what differs from this line (with no line, only what is wrong on any creature), and for a token says which edge the head points to (Foundry's front is the top; the report gives the rotation that fixes it); the result reports `anatomy`. Read it, then look anyway: the judge can be wrong, and a flaw is one edit-image call away.
dressingNoBattlemaps only: this pass adds dressing (furniture, props, debris, foliage) rather than restyling the paint, so the drift check is advisory: one render, delivered under its normal name with `drift` and the checkerboard reported, never redone and never refused (every added piece reads to the check as moved layout). Check the walls by eye on the checkerboard. The result carries `dressing: true`.
thinkingNoHow much the model thinks before it draws (Nano Banana 2.1: minimal, medium, high; the default is medium). Thinking is billed at the text rate, from a fraction of a cent to a few cents a render; the result reports thinkingTokens. Try "high" on a prompt that carries many constraints at once (a token with a face and several pieces of gear to match).
confirmProNoRequired true with tier: "pro". Offer pro to the owner as an option for portraits and illustrations ("pro is available for a bit extra"); never assume it.
referencesNoOptional extra references (attached after the source; indexes start at 2).
instructionYesThe change, and only the change: "replace the greatsword with a war maul crackling with violet energy". For a flaw-fix pass, name every flaw precisely in one instruction ("the left peryton has four legs; give it two", "remove the second fireball") and end with "keep everything else identical". Everything else is kept by the tool's own wording.
sourceImageYesAbsolute path of the image to edit (PNG/JPEG/WebP).
creatureSizeNoTokens only. medium (default): one grid cell, Tiny through Medium, a 512 square. large: Large, Huge, or Gargantuan, a 1024 square, the native render edge.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv1.3.2
    • addedInput schema / properties / anatomy
      Added value: +{
      +  "description": "Tokens and portraits only: what the creature should have, in one line from the Monster Manual (\"two arms, two legs, one large eye, no tail\"; \"a mushroom with exactly four tendrils and no limbs\"). Every token and portrait render is shown to the judge model, which counts heads, eyes, limbs, hands and fingers, tails, tendrils and held objects, flags what differs from this line (with no line, only what is wrong on any creature), and for a token says which edge the head points to (Foundry's front is the top; the report gives the rotation that fixes it); the result reports `anatomy`. Read it, then look anyway: the judge can be wrong, and a flaw is one edit-image call away.",
      +  "maxLength": 400,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / dressing
      Added value: +{
      +  "description": "Battlemaps only: this pass adds dressing (furniture, props, debris, foliage) rather than restyling the paint, so the drift check is advisory: one render, delivered under its normal name with `drift` and the checkerboard reported, never redone and never refused (every added piece reads to the check as moved layout). Check the walls by eye on the checkerboard. The result carries `dressing: true`.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / kind / description
      Previous value: -"Purpose preset. icon: 1:1 flash → 512 square. prop: a map prop (furniture, barrel, tree) seen straight down, object only, cut to alpha at its tile size (300 px per grid cell; an edit keeps the source size). token: 1:1 flash, top-down full body on a chroma plate, cut to alpha on a 512 square (1024 for creatureSize: \"large\"), no shadow (framing, plate, and cut are done for you). portrait: 3:4 at 2K. illustration: 16:9 at 4K → 2560×1600 (16:10 crop). Every kind defaults to flash; tier: \"pro\" is opt-in and needs confirmPro."New value: +"Purpose preset. icon: 1:1 flash → 512 square. prop: a map prop (furniture, barrel, tree) seen straight down, object only, cut to alpha at its tile size (300 px per grid cell; an edit keeps the source size). token: 1:1 flash, top-down full body on a chroma plate, cut to alpha on a 512 square (1024 for creatureSize: \"large\"), no shadow (framing, plate, and cut are done for you). portrait: 3:4 at 2K. illustration: 16:9 at 4K → 2560×1600 (16:10 crop). battlemap (edit-image only): restyle a bought map with its layout locked, delivered on the source's pixel grid (a whole-number upscale for a small source), drift-checked. overland (edit-image only): repaint a regional or world map on the same grid, bare of every name and symbol, with a looser drift check. Every kind defaults to flash; tier: \"pro\" is opt-in and needs confirmPro."
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "icon",
      -  "token",
      -  "prop",
      -  "portrait",
      -  "illustration"
      -]New value: +[
      +  "icon",
      +  "token",
      +  "prop",
      +  "portrait",
      +  "illustration",
      +  "battlemap",
      +  "overland"
      +]
    • changedInput schema / properties / references / items / properties / label / description
      Previous value: -"Short name used to bind the reference in the prompt, e.g. \"Morgash\"."New value: +"Short name used to bind the reference in the prompt, e.g. \"the captain\"."
    • changedInput schema / properties / references / items / properties / role / description
      Previous value: -"character: hold this face/figure (up to 4 on flash, 5 on pro). style: match palette, brushwork, light, camera angle; never copy the subject (works on both tiers in practice). pose: match only its pose, head direction, camera angle, and silhouette, never its drawing; for replacing a weak token, attach the old one as the ONLY image with this role."New value: +"character: hold the features, hair, skin, build and kit of this person (up to 4 on flash, 5 on pro); the pose, head angle and camera come from the prompt and the source image, so a crop already at the angle you want beats a frontal portrait. Identity only: the reference's lighting, palette, glow, background and camera are never taken, so a token made from a portrait crop is lit by its own scene, not the portrait's. object: reproduce this exact object (a crop of a weapon head, a shield face, a garment) in shape, materials, colours and markings (up to 10 on flash, 6 on pro). style: match palette, brushwork, light, camera angle; never copy the subject (works on both tiers in practice). pose: match only its pose, head direction, camera angle, and silhouette, never its drawing; for replacing a weak token, attach the old one as the ONLY image with this role."
    • changedInput schema / properties / references / items / properties / role / enum
      Previous value: -[
      -  "character",
      -  "style",
      -  "pose"
      -]New value: +[
      +  "character",
      +  "object",
      +  "style",
      +  "pose"
      +]
    • changedInput schema / properties / references / maxItems
      Previous value: -13New value: +12
    • addedInput schema / properties / thinking
      Added value: +{
      +  "description": "How much the model thinks before it draws (Nano Banana 2.1: minimal, medium, high; the default is medium). Thinking is billed at the text rate, from a fraction of a cent to a few cents a render; the result reports thinkingTokens. Try \"high\" on a prompt that carries many constraints at once (a token with a face and several pieces of gear to match).",
      +  "enum": [
      +    "minimal",
      +    "medium",
      +    "high"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / tier / description
      Previous value: -"Default flash (Nano Banana 2, ~7-15¢), never needs a confirm. \"pro\" (Nano Banana Pro, ~13-24¢, style-reference slots, stronger multi-figure scenes) needs confirmPro."New value: +"Default flash (Nano Banana 2.1, ~3-11¢), never needs a confirm. \"pro\" (Nano Banana Pro, ~13-24¢, style-reference slots, stronger multi-figure scenes) needs confirmPro."
  2. Changed5 schema fields changedv1.1.0
    • addedInput schema / properties / creatureSize
      Added value: +{
      +  "description": "Tokens only. medium (default): one grid cell, Tiny through Medium, a 512 square. large: Large, Huge, or Gargantuan, a 1024 square, the native render edge.",
      +  "enum": [
      +    "medium",
      +    "large"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / kind / description
      Previous value: -"Purpose preset. icon: 1:1 flash → 512 square. token: 1:1 flash, top-down full body on a chroma plate, cut to alpha on a 512 square (framing, plate, and cut are done for you). portrait: 3:4 at 2K. illustration: 16:9 at 4K → 2560×1600 (16:10 crop). Every kind defaults to flash; tier: \"pro\" is opt-in and needs confirmPro."New value: +"Purpose preset. icon: 1:1 flash → 512 square. prop: a map prop (furniture, barrel, tree) seen straight down, object only, cut to alpha at its tile size (300 px per grid cell; an edit keeps the source size). token: 1:1 flash, top-down full body on a chroma plate, cut to alpha on a 512 square (1024 for creatureSize: \"large\"), no shadow (framing, plate, and cut are done for you). portrait: 3:4 at 2K. illustration: 16:9 at 4K → 2560×1600 (16:10 crop). Every kind defaults to flash; tier: \"pro\" is opt-in and needs confirmPro."
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "icon",
      -  "token",
      -  "portrait",
      -  "illustration"
      -]New value: +[
      +  "icon",
      +  "token",
      +  "prop",
      +  "portrait",
      +  "illustration"
      +]
    • changedInput schema / properties / references / items / properties / role / description
      Previous value: -"character: hold this face/figure (up to 4 on flash, 5 on pro). style: match palette, brushwork, light, camera angle; never copy the subject (works on both tiers in practice)."New value: +"character: hold this face/figure (up to 4 on flash, 5 on pro). style: match palette, brushwork, light, camera angle; never copy the subject (works on both tiers in practice). pose: match only its pose, head direction, camera angle, and silhouette, never its drawing; for replacing a weak token, attach the old one as the ONLY image with this role."
    • changedInput schema / properties / references / items / properties / role / enum
      Previous value: -[
      -  "character",
      -  "style"
      -]New value: +[
      +  "character",
      +  "style",
      +  "pose"
      +]
  3. Addedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden and mostly does: it discloses the chroma-plate/alpha-cut pipeline, the judge-model anatomy pass, battlemap drift retry-then-refuse, dressing never-retried, and the returned file path/dimensions/spend. But the wall of prose buries these traits, the retry semantics are spread across run-on clauses, and it never states permissions or what happens on a failed edit, capping it below top marks.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded, but the body is one enormous paragraph of parenthetical asides and anecdotes ("pro was no better at fixes and re-cropped once") that add noise for an agent scanning for routing signal. Information density is high but structure and economy are weak.

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?

For an 11-parameter, multi-mode tool with no output schema, it covers every kind's behavior, the anatomy reporting, drift/retry policy, and the return payload. Nothing an agent needs to call it correctly in any mode is missing.

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 100% and the schema already documents kind, tier, anatomy, dressing, thinking, references, and creatureSize in depth, so the description largely restates structured data. Coverage is high enough that the baseline 3 is appropriate; the description adds little parameter meaning the schema doesn't already carry.

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 opening sentence names a specific verb (Edit) and resource (an existing image) plus its defining constraint: one instruction while preserving identity, pose, angle, and style. That cleanly separates it from the generate-image sibling, which has no source to preserve.

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?

It gives explicit when-to-use guidance for internal modes: flash for every kind, pro only for portraits/illustrations and needing confirmPro, dressing only on battlemaps, anatomy only on tokens/portraits. It never explicitly routes against the sibling tools (generate-image, cutout-image), so it stops short of full alternative guidance.

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