Skip to main content
Glama

reduce_colors

Quantize multiple images onto one shared palette so animation frames or directional sprites stay color-consistent. Choose auto, exact count, or reuse an existing palette; optional ordered dithering.

Instructions

Quantize one or more images onto a smaller SHARED palette, optionally with ordered dithering. Pass an animation's frames or a character's eight directions in one call so they come back sharing one palette instead of drifting apart. Choose the palette by omitting both options (auto-detect size), num_colors (exact count), or palette_image (reuse an existing image's colors, max 256). Total pixel budget across all frames is 512x512 (e.g. sixteen 64x64 frames).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imagesYesImage(s) to quantize together. All must be the same size
ditheringNoOrdered dithering matrix size (default 'none'). Larger = smoother gradients, busier look
num_colorsNoTarget number of colors. Omit to auto-detect. Mutually exclusive with palette_image
palette_imageNoImage whose colors become the palette (max 256 colors). Mutually exclusive with num_colors
dithering_strengthNoHow strongly to dither (0-10, default 5). Ignored when dithering is 'none'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.8.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and it does so well: it reveals shared-palette behavior across frames, why batching matters (avoiding palette drift), and the 512x512 total pixel budget. It doesn't mention what the response contains, but for a pure transform the important behavioral constraints are covered.

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?

Four sentences each earn their place: purpose, batching scenario, palette-selection options, and the pixel-budget constraint. It is front-loaded with the core behavior and includes a concrete example without padding.

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 5-parameter tool with nested base64 objects, the description covers the shared-palette use case, all three palette modes, mutual-exclusion implications, and the size limit. The only notable omission is an explicit statement of the return shape, since there is no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real value: it explains the auto-detection path when both num_colors and palette_image are omitted, frames the max-256 limit, and clarifies that num_colors is an exact count. These semantics are absent from the parameter descriptions.

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 clause names a specific operation (quantize), target (one or more images), and outcome (a smaller shared palette), which clearly distinguishes it from image-edit siblings like resize, unzoom, or image_to_pixelart. The capitalization of SHARED highlights the key batch property.

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 concrete when-to-use context by telling the agent to pass animation frames or a character's eight directions in one call to preserve a single palette, and it clarifies the three palette-selection paths. It does not name alternative tools or state when not to use it, so it stops short of an explicit with/without comparison.

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

Deploy Server

Other Tools