Skip to main content
Glama

set_palette

Destructive

Replace a sprite's palette using hex colors or a palette file, and optionally convert to indexed mode so every pixel snaps to the nearest palette color.

Instructions

Replace the palette from a list of hex colors or a palette file (.gpl, .pal, .png, .aseprite). With to_indexed=True the sprite is converted to indexed mode and every pixel snaps to its nearest palette color.

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": {
      "path": "<path>"
    },
    "name": "set_palette"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
colorsNo
ditheringNonone
to_indexedNo
palette_fileNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and readOnly=false, but the description adds meaningful behavior beyond them: setting to_indexed converts the sprite to indexed mode and snaps every pixel to the nearest palette color. That is exactly the kind of consequence an agent needs before calling a destructive tool, though it does not say whether the prior palette is recoverable.

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 sentences, zero filler, and the primary action plus source formats are front-loaded before the to_indexed caveat. Every clause earns its place.

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?

For a destructive, 5-parameter mutation with no output schema, the description covers the core palette-replacement semantics well but omits the required path meaning, dithering behavior, and any note on return values or failure modes.

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 0%, so the description carries the full burden. It explains colors, palette_file (with accepted extensions), and to_indexed, but leaves the required 'path' parameter's meaning and the dithering enum ('none', 'ordered', 'old') entirely unexplained.

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 specific verb and resource ('Replace the palette') and enumerates accepted source formats (.gpl, .pal, .png, .aseprite). It does not distinguish itself from the sibling palette_swap, so the agent must infer which tool to pick, keeping it below a 5.

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?

It implies usage by presenting two source modes (inline hex list vs palette file) and explains the to_indexed variant. However, it never states when to prefer this over palette_swap, nor does it mention prerequisites such as opening a sprite or whether an existing palette is overwritten.

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