Skip to main content
Glama

generate-image

Create Foundry VTT tokens, portraits, props, icons, and battlemaps from text prompts, with anatomy checks and ready-to-use PNG assets saved to disk.

Instructions

Generate one Foundry art asset from a prompt via the Gemini image API. kind picks the model tier, aspect, size, framing text, and post-processing; the result is a finished PNG on disk. READ IT before showing anyone: count limbs per creature, check for duplicated spell effects or props, stray signatures, and reference faces on the wrong figure; obvious flaws are one edit-image call away. Every token and portrait render is also 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. Every kind runs on flash by default; tier: "pro" refuses without confirmPro: true and states the cost. Returns the 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.
promptYesWhat a camera would see, in illustrator terms. Do not add framing or background text for icons and tokens; the preset appends it.
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.
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).
footprintNoProps only: grid cells wide x tall, e.g. "2x1" for a table (default "1x1"). The prop is rendered at the nearest API aspect and delivered at 300 px per cell (600x300 here). Library files carry it in their name: "TC_Anvil 02_2x1.png".
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.
referencesNoReference images, attached in this order. Bind each in the prompt by its label or 1-based index ("Image 2 is the captain").
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. Changed9 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"
      +}
    • 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 / description
      Previous value: -"Reference images, attached in this order. Bind each in the prompt by its label or 1-based index (\"Image 2 is Morgash\")."New value: +"Reference images, attached in this order. Bind each in the prompt by its label or 1-based index (\"Image 2 is the captain\")."
    • 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"
      +]
    • 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. Changed6 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"
      +}
    • addedInput schema / properties / footprint
      Added value: +{
      +  "description": "Props only: grid cells wide x tall, e.g. \"2x1\" for a table (default \"1x1\"). The prop is rendered at the nearest API aspect and delivered at 300 px per cell (600x300 here). Library files carry it in their name: \"TC_Anvil 02_2x1.png\".",
      +  "pattern": "^\\d{1,2}x\\d{1,2}$",
      +  "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. Changed12 schema fields changedv1.0.0
    • removedInput schema / properties / batch
      Removed value: -{
      -  "default": 6,
      -  "description": "Draft mode only: images per batch.",
      -  "maximum": 8,
      -  "minimum": 1,
      -  "type": "integer"
      -}
    • addedInput schema / properties / confirmPro
      Added value: +{
      +  "description": "Required 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.",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / denoise
      Removed value: -{
      -  "default": 0.7,
      -  "description": "Refine mode only. 0.7 (pinned by test) keeps the scene skeleton in dev style; ~0.55 clones composition but inherits the draft rendering style.",
      -  "maximum": 0.95,
      -  "minimum": 0.3,
      -  "type": "number"
      -}
    • changedInput schema / properties / kind / description
      Previous value: -"Purpose preset — fixes generation and output resolution. No raw dimensions."New 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."
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "handout",
      -  "scene-background",
      -  "portrait",
      -  "token"
      -]New value: +[
      +  "icon",
      +  "token",
      +  "portrait",
      +  "illustration"
      +]
    • removedInput schema / properties / mode
      Removed value: -{
      -  "default": "draft",
      -  "description": "draft: fast klein batch for curation. final: dev-quality render from the prompt alone, finished at output resolution. refine: dev img2img over sourceImage (a picked draft) — keeps its scene skeleton, re-renders in dev style, finished at output resolution.",
      -  "enum": [
      -    "draft",
      -    "final",
      -    "refine"
      -  ],
      -  "type": "string"
      -}
    • changedInput schema / properties / prompt / description
      Previous value: -"The full image prompt."New value: +"What a camera would see, in illustrator terms. Do not add framing or background text for icons and tokens; the preset appends it."
    • addedInput schema / properties / references
      Added value: +{
      +  "description": "Reference images, attached in this order. Bind each in the prompt by its label or 1-based index (\"Image 2 is Morgash\").",
      +  "items": {
      +    "properties": {
      +      "label": {
      +        "description": "Short name used to bind the reference in the prompt, e.g. \"Morgash\".",
      +        "type": "string"
      +      },
      +      "path": {
      +        "description": "Absolute path of a PNG/JPEG on disk.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "role": {
      +        "description": "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).",
      +        "enum": [
      +          "character",
      +          "style"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "path",
      +      "role"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 14,
      +  "type": "array"
      +}
    • removedInput schema / properties / seed
      Removed value: -{
      -  "description": "Fixed seed; random when omitted.",
      -  "minimum": 0,
      -  "type": "integer"
      -}
    • changedInput schema / properties / slug / description
      Previous value: -"Short kebab-case subject name used in output filenames, e.g. \"smugglers-cove\"."New value: +"Kebab-cased into the filename: <kind>-<slug>-<id>.png."
    • removedInput schema / properties / sourceImage
      Removed value: -{
      -  "description": "Refine mode only (required there): absolute path of the picked draft PNG.",
      -  "type": "string"
      -}
    • addedInput schema / properties / tier
      Added value: +{
      +  "description": "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.",
      +  "enum": [
      +    "flash",
      +    "pro"
      +  ],
      +  "type": "string"
      +}
  4. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations the description carries the whole burden and does: default tier, pro cost range and the confirmPro gate, that pro refuses without confirmation, billed thinking tokens, disk output, a judge model that checks anatomy on tokens and portraits, and what the result reports (path, dimensions, spend, anatomy, thinkingTokens). That is exactly the behavioral context annotations would otherwise supply.

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?

Front-loaded with the core action and output in the first sentence, with operational warnings after. It is dense and mostly earns its sentences, though the anatomy/verification material appears twice (once in the body, once in the anatomy parameter), costing a little tightness.

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?

A 10-parameter, 7-value enum generation tool with no output schema still needs the description to say what comes back, and it does: file path, dimensions, estimated spend, anatomy report, thinkingTokens. It also covers the cost gate and the default model, leaving nothing an agent needs before a first call.

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 in the schema and the description largely restates it (kind picks tier/aspect/size, pro needs confirmPro). The prose reinforces the safety-critical interaction between tier and confirmPro and the read-back of anatomy, but adds no syntax or format detail the schema lacks. Baseline 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 ('Generate one Foundry art asset from a prompt via the Gemini image API') plus the output form (a finished PNG on disk), and the first paragraph already contrasts the result with the fix path via the sibling edit-image. An agent can distinguish it from edit-image, cutout-image, and imagegen-status without opening a schema.

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?

Gives real usage constraints: inspect every render before showing anyone, use edit-image for one-call fixes, offer 'pro' only as an option and never assume it. It also notes battlemap/overland are edit-image-only kinds, which routes correctly. It does not spell out explicit when-not-to-use conditions (e.g. when to prefer cutout-image over the token preset's built-in alpha cut).

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