Skip to main content
Glama

reduce_colors

Reduce an image to N colours, like the Color Reducer on voidless.dev/tools. The palette is found in OKLab, a perceptual colour space (k-means seeded by median cut, or median cut alone), so the colours are spent where the eye sees a difference. Dithering is off by default (clean pixel art); ordered (Bayer 8x8) or Floyd-Steinberg are optional. Transparency is kept exactly. An image that already has N colours or fewer comes back unchanged. Returns the PNG with the before/after colour counts and the palette. Images up to 2048x2048, 256 frames, 32 MB of input per call. Free: no credits.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "image": "<image>"
    },
    "name": "reduce_colors"
  }
}

Input Schema

NameRequiredDescriptionDefault
saveNoAlso save the result to your Voidless library (free, private) and return its asset id and cdn.voidless.dev URL, for passing to the next tool without base64
imageYesAn image: an https URL (e.g. a cdn.voidless.dev link from get_asset or a saved result), a library image key (assets/…png, as get_asset lists it), a data: URI, or base64 PNG/GIF.
scaleNoAlso return a copy scaled up this much (nearest neighbour)
colorsNo
ditherNonone
methodNok-means
from_imageNoUse only colours the image already has (no averaged colours)
dither_strengthNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint false, destructiveHint false, idempotentHint false, openWorldHint true) by disclosing the hard limits (2048x2048, 256 frames, 32 MB per call), that transparency is preserved exactly, the no-op behavior for already-reduced images, the return payload (PNG plus before/after counts and palette), and that calls are free with no credits. This is exactly the kind of operational context an agent needs before invoking a processing tool.

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 packed with useful detail; almost every sentence carries information (mechanism, dithering, limits, return, pricing). It is a dense single block with no structural breaks, which makes scanning slightly harder than necessary.

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?

With no output schema, the description takes on the burden of describing the return value and does so (PNG, colour counts, palette), and it documents operational limits and cost. Minor gaps remain around a few unannotated parameters, but nothing an agent needs in order to call it correctly is missing.

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 only 50%, and the description compensates for the most consequential gaps by explaining the enum semantics: "ordered" means Bayer 8x8, and "k-means" is seeded by median cut rather than pure median cut — detail not present in the schema. It leaves dither_strength and the colors range/default unexplained, so it is not fully compensating.

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 ("Reduce an image to N colours") plus the mechanism (OKLab palette, k-means/median cut). An agent can immediately tell this apart from sibling palette tools such as extract_palette or match_palette, which read or impose palettes rather than reducing colour count.

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 clear context for the option choices: dithering defaults off for "clean pixel art," with ordered (Bayer 8x8) or Floyd-Steinberg as opt-ins, and notes that images already at or below N colours pass through unchanged. It does not explicitly name a sibling alternative or state when-not-to-use-this, so it falls short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources