Skip to main content
Glama

sort_palette

Sort palettes by hue, luminance, saturation, or value. Indexed sprites remap pixel indices to keep the image identical.

Instructions

Sort the palette by "hue", "luminance" (default), "saturation", or "value".

For indexed sprites the pixel indices are remapped so the image looks identical.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNoDefault: "luminance".luminance
reverseNoDefault: false.
filenameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.10.0
    • addedInput schema / properties / by / description
      Added value: +"Default: \"luminance\"."
    • removedInput schema / properties / by / title
      Removed value: -"By"
    • removedInput schema / properties / filename / title
      Removed value: -"Filename"
    • addedInput schema / properties / reverse / description
      Added value: +"Default: false."
    • removedInput schema / properties / reverse / title
      Removed value: -"Reverse"
    • removedInput schema / title
      Removed value: -"sort_paletteArguments"
  2. First observedv0.7.0

TDQS

A3.9/5.0
Behavior4/5

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

With readOnlyHint=false signalling a mutation, the description adds a genuinely useful behavioral detail beyond annotations: indexed sprites have pixel indices remapped so the image appearance is preserved. It does not say whether the file is modified in place or what happens on non-indexed sprites, keeping it short of a 5.

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 tight sentences; the sort keys and default are front-loaded, and the indexed-sprite caveat follows with zero filler.

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 mutation tool with no output schema, the description covers the options and the key side effect. It leaves minor ambiguity about mutation target/in-place behavior, but is otherwise complete enough to call 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 67% and the schema's 'by' field only states the default. The description supplies the actual valid values (hue, luminance, saturation, value), adding real meaning beyond the schema. 'reverse' remains undocumented in both, so not quite a 5.

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?

States a specific verb (sort) and resource (the palette) plus the sort keys available. It is clearly distinct from siblings like resize_palette, cycle_palette, or load_palette, though it does not explicitly name any alternative for contrast.

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 lists valid sort modes and the default, implying the operation's context, but gives no guidance on when to use it versus sibling palette tools or any prerequisites.

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