Skip to main content
Glama

Ase Quantize To Palette

ase_quantize_to_palette

Quantize opaque pixels in a sprite to the nearest palette color, making existing art conform to an applied palette. Works across all layers and frames; returns the number of pixels changed.

Instructions

Snap every opaque pixel to the nearest color in the sprite's own palette (RGB distance, cached per color). layer None = all layers, frame=0 = every frame. Run after ase_apply_palette_preset / ase_set_palette to make existing art conform. Returns the number of pixels changed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frameNo
layerNo
sprite_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.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 well: it discloses the opaque-pixel scope, RGB distance matching, per-color caching, layer/frame defaults, and the return value. It does not explicitly state that transparent pixels are left untouched or that the operation modifies the sprite in place, but the core behavior is transparent.

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?

Three short sentences deliver the core operation, the critical parameter semantics, the workflow context, and the return value with no filler. The most important action is front-loaded before defaults and workflow guidance.

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?

The description covers the operation, the two optional parameters' scope, the recommended sequence relative to palette-setting tools, and the return value, which aligns with the output schema. A small gap remains around explicit handling of transparent pixels and whether the edit is destructive or reversible, but the agent has enough to invoke it correctly.

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 0%, so the description must compensate. It adds real meaning by explaining that layer None means all layers and frame=0 means every frame, which are non-obvious defaults. sprite_path is not described, but its purpose is evident from the parameter name and the tool's function.

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 states a specific action ('Snap every opaque pixel to the nearest color'), identifies the exact resource ('the sprite's own palette'), and specifies the distance metric. This clearly distinguishes it from broader palette-setting or color-adjustment siblings by framing it as a quantization-to-existing-palette operation.

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?

The description explicitly tells the agent when to run this tool: after ase_apply_palette_preset or ase_set_palette, to make existing art conform to the updated palette. It does not explicitly state when not to use it or name alternatives, so it stops short of a full 5.

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