Skip to main content
Glama

cutout-image

Remove token backgrounds to transparent alpha, center the subject on a 512px square for Foundry VTT scale 1.0, and write a preview for edge verification.

Instructions

Knock the background off a token image to real alpha and deliver it centred on a 512 square so Foundry scale 1.0 is right. Writes a magenta-composited *_preview.png beside it: READ THAT before trusting the edge. Returns coverage, residual-key and haze numbers; a cut that fails any of them falls back to the rembg AI matte automatically.

Input Schema

NameRequiredDescriptionDefault
sizeNoSquare canvas edge; default 512 (Foundry scale 1.0). 0 keeps the source canvas.
trimNoTighten to the subject before fitting (default true); false letterboxes as-is.
colorNoChroma key colour: "green", "magenta", "blue", or #RRGGBB. Omit to sample the corners.
erodeNoShrink the matte N px to eat a fringe.
methodNoauto (default): chroma if the plate is a flat key colour, with a rembg fallback when the cut fails verification. chroma: flat green/blue/magenta/solid plates, instant. rembg: AI matte for busy backgrounds, hair, and soft edges (first use downloads a ~176 MB model).
outputNoAbsolute output path (.png). Default: next to the source as <name>-cut.png.
padPctNoTransparent margin, % of the edge (4).
dropShadowNoAdd the world tokens' soft cast shadow (dark silhouette, ~38%, down-right) under the cut. Off by default; tokens from this server go out shadowless (owner rule 2026-09-24).
keepShadowNochroma only: keep a cast shadow on the plate.
sourceImageYesAbsolute path of the image to cut (PNG/JPEG/WebP).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.0
    • addedInput schema / properties / dropShadow
      Added value: +{
      +  "description": "Add the world tokens' soft cast shadow (dark silhouette, ~38%, down-right) under the cut. Off by default; tokens from this server go out shadowless (owner rule 2026-09-24).",
      +  "type": "boolean"
      +}
  2. Addedv1.0.0

TDQS

A4.3/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 behavioral burden and does so well: it declares the side-effecting file write (a magenta-composited *_preview.png beside the output), the returned verification numbers (coverage, residual-key, haze), and the automatic fallback to the rembg AI matte when a cut fails those checks. These are non-obvious behaviors the agent could not infer from the schema.

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?

Three front-loaded sentences with no filler: purpose first, then the verification artifact, then the fallback behavior. The jargon ('real alpha', 'Foundry scale 1.0', 'residual-key') is dense but domain-appropriate, though the second sentence's emphasis on reading the preview is slightly buried.

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 10-parameter, no-annotation, no-output-schema tool, the description covers the crucial non-schema facts: the file side effect, the metrics returned, and the fallback policy. It leaves out default output naming and failure/error surfacing, but those are largely covered by the 100%-covered schema, so the remaining gap is minor.

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%, so the schema already documents all 10 parameters in detail. The description only echoes the 512-square default and the preview artifact; it adds no syntax, format, or constraint detail beyond what the schema provides. Baseline 3 is appropriate here.

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 + resource ('Knock the background off a token image') and adds the output contract (true alpha, centred on a 512 square for Foundry scale 1.0). It is unmistakably distinct from the siblings generate-image, edit-image, and imagegen-status, so an agent can select it on name and purpose 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?

It tells the agent to read the *_preview.png before trusting the edge and implies the rembg fallback path when verification fails, which is real operational guidance. However, it never explicitly states when NOT to use this tool or names an alternative among the sibling tools, so it falls short of a full when/when-not routing instruction.

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