Skip to main content
Glama

Extract palette

extract_palette

Pull main colors from a PNG or JPEG image with median cut, returning hex codes and a GIMP/Aseprite .gpl palette for pixel art projects.

Instructions

Pull the main colours out of an image (median cut). Returns hex codes plus a GIMP/Aseprite .gpl palette.

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": {
      "input": "<input>"
    },
    "name": "extract_palette"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesPath or URL of a PNG or JPEG image
colorsNoHow many colours to extract

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose the algorithm (median cut) and the return artifacts (hex codes, GIMP/Aseprite .gpl). However, it omits whether a file is written to disk versus returned inline, whether URLs are fetched over the network, and any size or format limits beyond PNG/JPEG in the schema.

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?

Two compact clauses with the action and output front-loaded; no filler, and the algorithm hint is packed into a parenthetical.

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 simple two-parameter tool with a fully described schema, the description covers purpose, method, and return format. Without an output schema it could be slightly more explicit about the response shape, but nothing essential is missing.

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 coverage is 100%, with both parameters documented in the schema including the 2–64 range and default of 8. The description adds no further parameter meaning beyond "main colours", so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a concrete verb and resource ("Pull the main colours out of an image"), names the algorithm (median cut), and specifies the output form (hex codes plus a .gpl palette). That is enough to distinguish it from remap_palette or list_palettes, though it doesn't explicitly contrast itself with those siblings.

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?

Usage is only implied by the verb: this is the tool that produces a palette from an image rather than applying one. There is no explicit statement of when to prefer it over remap_palette or pixelate_image, and no prerequisites for the input path or URL are given.

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