Skip to main content
Glama

Apply a palette

apply_palette
Read-only

Recolour an image to a game palette so assets from different sources match: PICO-8, Sweetie 16, Endesga 32, Game Boy, NES style or your own hex codes, or reduce it to its own best N colours. Optional ordered dithering for gradients. Transparency is kept.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "apply_palette"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoShort name for the output files.
colorsNoWithout palette: reduce to this many of the image's own colours.
ditherNo0 is flat colour, 1 is strong ordered dithering.
paletteNopico-8, sweetie-16, endesga-32, gameboy, nes-like, or hex codes like "#1a1c2c #b13e53 ...". Leave out and give colors to use the image's own colours.
image_urlNoPublic http(s) URL of a PNG image, up to about 128×128 pixels.
image_base64NoThe PNG file as base64 (a data: URL also works). Use instead of image_url.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

The annotations already declare readOnlyHint and openWorldHint, so the description does not need to restate safety. It adds useful behavioural details: ordered dithering is optional and intended for gradients, and transparency is preserved. It still does not describe output format or whether output files are returned directly, but the key transformation behaviour is disclosed.

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?

The description is compact and front-loaded: it leads with the primary action, then palette options, fallback mode, dithering, and transparency. Every sentence contributes relevant information without repetition.

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 six-parameter image transformation tool with full schema coverage and safety annotations, the description covers purpose, modes, dithering, and transparency well. It is slightly incomplete about the returned output, but there is no output schema, so that is a minor remaining gap.

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%, so the parameter descriptions already carry the main semantics. The description reinforces the palette versus own-colour modes and dithering purpose, but adds little beyond what the schema already explains for palette, colors, and dither.

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 states a specific verb and resource — recolouring an image to a game palette — and enumerates the supported palette families and the alternative own-colour reduction mode. An agent can immediately understand what the tool does and how it differs from generic image-fixing siblings.

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 gives clear usage context: matching assets from different sources, choosing a named palette or custom hex codes, or reducing to the image's own best N colours. It does not explicitly compare against siblings such as palette or fix_pixel_art, but the intended scenarios are clear enough.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources