Skip to main content
Glama

extract_palette

Extract an optimal color palette from a sprite using quantization, apply it, and return the colors.

Instructions

Build an OPTIMAL palette from the sprite via native ColorQuantization.

True palette extraction (vs the nearest-snap quantize_to_palette): writes the resulting palette to the sprite and returns it. NOTE: mutates the sprite's palette. Sprite must be in RGB mode.

Args: filename: Aseprite file to modify max_colors: palette size cap, 1..256 (fewer if the art has fewer) with_alpha: include alpha when quantizing

Returns: JSON {colors: [#RRGGBB, ...], count}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
max_colorsNo
with_alphaNo
Behavior4/5

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

Discloses mutation of sprite's palette via explicit note. Describes that it writes and returns palette. With no annotations, description carries burden and adequately covers side effects and mode requirement.

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?

Well-structured with bold purpose, contrast, note, and args list. Front-loaded. Slightly verbose due to repeated parameter listing, but all content earns its place given no schema descriptions.

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?

Covers purpose, mutation, mode, parameter semantics, and return format. Lacks error conditions or edge cases, but given tool complexity, it provides sufficient context for correct invocation.

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

Parameters5/5

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

Despite 0% schema coverage, description provides full parameter explanations: filename as file to modify, max_colors as size cap with range and adaptive behavior, with_alpha for alpha inclusion. Adds meaning beyond schema names/types.

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?

Clear verb 'Build/extract' and resource 'palette from sprite'. Directly contrasts with sibling 'quantize_to_palette', distinguishing it as true palette extraction vs nearest-snap. Note about mutation and RGB mode adds specificity.

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?

Explicitly differentiates from sibling tool via contrast. States prerequisite (RGB mode). Lacks explicit 'when not to use' or alternative scenarios, but the contrast implies usage for optimal palette extraction.

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/NosytLabs/aseprite-mcp'

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