Skip to main content
Glama

set_palette

Replace a sprite's palette using custom colours or a preset such as pico8 or gameboy. Indexed pixels keep their indices and display the new colours; transparent and RGB behaviour is preserved.

Instructions

Replace the palette with the given colours or a preset; pass exactly one of them.

Colours may carry alpha and may be 'transparent'. RGB pixels do not change. Indexed pixels keep their indices, so each shows the new colour at its entry; the palette must stay large enough for every index in use, and the transparent index stays the same. Grayscale sprites are refused: Aseprite always gives them the 256 grays, so convert to rgb or indexed with set_color_mode first.

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
pathYesSprite file. Relative paths resolve against the server root.
colorsNo1 to 256 colours
presetNoA preset palette, see aseprite://palettes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so thoroughly: it discloses that RGB pixel data is unaffected, that indexed pixels retain their indices and thus show new colours, that the palette must remain large enough for every index in use, and that the transparent index is preserved. It also documents a refusal case (grayscale sprites) and the remedy, which is exactly the kind of precondition an agent needs before a destructive replacement.

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?

The definition is front-loaded — the core action and the one-of constraint come first, then pixel-mode consequences. Every sentence carries information, though the paragraph runs together several distinct concerns (alpha support, indexed behaviour, size constraint, grayscale refusal) that could be split for faster scanning.

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

Completeness5/5

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

An output schema exists, so return values need not be explained, and the remaining complexity — a 3-parameter mutation with mode-dependent side effects — is fully covered. Nothing an agent needs in order to call this correctly, or to predict its refusals, is missing.

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 100%, so the baseline is 3, but the description adds meaning the schema does not encode: the colours and preset parameters are mutually exclusive and exactly one is required. The alpha/transparent notes largely restate the schema's item description, so the gain is real but narrow.

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 opens with a specific verb and resource ('Replace the palette') and immediately scopes it to 'the given colours or a preset', which distinguishes it cleanly from read-oriented siblings like get_palette and extract_palette. An agent knows what this does without opening the schema.

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?

It states an explicit invocation constraint — 'pass exactly one of them' — which is real when-to-use guidance that the schema does not enforce. It also names the alternative route for the unsupported case ('convert to rgb or indexed with set_color_mode first'), giving a concrete escape hatch rather than leaving the agent stuck.

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