Skip to main content
Glama

set_color_mode

Converts a sprite to RGB, grayscale, or indexed color mode, mapping missing palette colors to nearest entries and reporting dropped palette entries when needed.

Instructions

Convert the sprite to rgb, grayscale or indexed.

Indexed uses the sprite's current palette without dithering; colours missing from the palette map to the nearest entry. Index 0 becomes the transparent colour: when the palette is full, its least used entry is dropped to make room and reported in dropped_palette_entries.

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>",
      "mode": "<mode>"
    },
    "name": "set_color_mode"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesColour mode
pathYesSprite file. Relative paths resolve against the server root.

Output Schema

NameRequiredDescriptionDefault

No arguments

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?

With no annotations, the description carries the full burden and does meaningful work: it discloses the palette-mapping rule (nearest entry for missing colours), that index 0 becomes transparent, and that a full palette silently evicts the least-used entry which is surfaced in dropped_palette_entries. It omits whether the change is written in place or reversible and whether any permissions are needed.

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 core action and mode list are front-loaded in the first sentence, and the second sentence spends its words on non-obvious indexed behaviour rather than filler. Minor slack from the line-wrapped formatting, but no sentence is wasted.

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?

An output schema exists, so the reference to dropped_palette_entries is a helpful pointer rather than required explanation. For a mutating file operation with zero annotations, only the in-place/reversibility and failure behaviour remain undisclosed, which is a modest 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 both parameters are already documented (mode enum with labels, path with server-root resolution). The description adds real meaning about what the 'indexed' mode does, but adds nothing about 'path' or about how mode interacts with the sprite's existing state beyond the palette note.

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 and resource (convert the sprite) plus the exhaustive set of target modes, so the agent knows exactly what the operation does. It does not differentiate itself from plausibly related siblings such as set_palette or adjust_colors, leaving that differentiation to 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the description explains what 'indexed' means, which implicitly tells the agent when that mode is appropriate, but there is no explicit when-to-use/when-not guidance or named alternative. No prerequisites (e.g. palette must exist) are stated.

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