Skip to main content
Glama

generate-image

Create Foundry VTT art assets from a prompt: icons, tokens, portraits, and illustrations in ready-to-use PNG files, with tier and reference options.

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 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

TableJSON Schema
NameRequiredDescriptionDefault
kindYesPurpose 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.
slugYesKebab-cased into the filename: <kind>-<slug>-<id>.png.
tierNoDefault 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.
promptYesWhat a camera would see, in illustrator terms. Do not add framing or background text for icons and tokens; the preset appends it.
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 Morgash").

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full transparency burden and does so thoroughly: it discloses default and pro model tiers with cost ranges, that pro refuses unless confirmPro is true, that framing/plate/cut post-processing is applied automatically, and the return payload (path, dimensions, estimated spend). It even includes a quality-control caveat about inspecting for artifacts before sharing.

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?

The description is compact for a 6-parameter tool with no output schema and front-loads purpose plus the most consequential behavior: model tier, confirmPro refusal, and cost. Every sentence earns its place, including the post-generation checklist and return-value note.

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?

Because there is no output schema, the description explicitly states what the tool returns: file path, dimensions, and estimated spend. It covers cost behavior, confirmPro requirements, cross-tool routing to edit-image, and automatic post-processing, leaving the agent with the information needed to invoke it safely.

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 the schema already documents kind, slug, tier, prompt, confirmPro, and references in detail. The description adds a useful overview of what kind controls and the default-vs-pro behavior, but it does not materially exceed the parameter-level explanations already present in the schema.

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 specific verb and resource: Generate a Foundry art asset from a prompt via the Gemini image API, and states the deliverable (finished PNG on disk). It also separates generation from the edit-image sibling by explicitly routing post-generation flaws to edit-image.

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 clear context for when to use flash vs. pro tiers, when confirmPro is mandatory, and points flawed outputs to edit-image. It does not explicitly contrast generate-image with artificer-status or cutout-image, but the generation-vs-post-processing distinction is largely evident from the sibling names and the finished-PNG framing.

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