Skip to main content
Glama

quantize_reference

Downsample a reference image to specified dimensions and quantize its colors to the document palette or a generated median-cut palette. Optionally output to a specific layer.

Instructions

Downsample a reference to the given size and map it to the document palette ('document') or to a fresh median-cut palette appended to the document ('auto'). Optionally write the result into a layer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYes
ditherNoDefault: none
doc_idYesDocument id
heightYes
ref_idYes
paletteNoDefault: document
to_layerNoLayer id or name to write the result into (size must match the canvas)
max_colorsNoauto mode: colors to extract (default 16)
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses downsampling, palette mapping, and optional layer writing, but does not clarify side effects (e.g., whether original reference is modified) or return value. Moderate transparency, but missing behavioral details.

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 two sentences (approximately 30 words), front-loading the core action and options. Every sentence provides value; no redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 8 parameters, no output schema, and no annotations, the description covers the main functionality but lacks details on defaults for dither and max_colors, and does not explain the absence of to_layer. It is adequate but not thorough.

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 63%, and the description does not add significant meaning beyond the schema. For instance, width and height are only described with min/max, and palette options are already enumerated. The description adds no new semantics, so baseline score applies.

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 clearly states the action (downsample and map palette), the resource (reference), and the two palette modes ('document' or 'auto') with optional layer output. It effectively distinguishes the tool from siblings by specifying its unique quantization behavior.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description outlines the two palette modes and optional layer writing, but does not provide explicit guidance on when to use this tool over alternatives like extract_palette or mix_palette_colors. Usage context is implied but not clearly stated.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ehm-93/pixel-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server