Skip to main content
Glama

replace_color

Recolor pixels by swapping one color for another on a layer or all layers across frames, with optional RGB tolerance.

Instructions

Replaces one color with another on a layer (or all layers) across frames, with optional per-channel tolerance (RGB).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYes
tagNoUse the frames of this tag
fromYes'#rrggbb', '#rrggbbaa', a name, a palette index, or {r,g,b,a} / {h,s,v,a} / {h,s,l,a} / {gray,a}
saveNoBatch mode: write changes back to the sprite file (default true)
frameNo1-based frame number. Defaults to the active frame (or 1).
layerNoLayer name, 'Group/Child' path, or 1-based index from get_sprite_info. Defaults to the active layer.
framesNo'all' or a list of frame numbers
spriteNoFile path, open tab title, or sprite id. Defaults to the active sprite (live). Batch mode needs a file path.
backendNoauto (default): live Aseprite if connected, else headless batch
toleranceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already indicate this is not read-only but not destructive. The description adds scope details (layer/all layers, across frames) and optional tolerance, but it does not disclose important behavioral context such as save-side effects, undo behavior, or batch/live mode differences. No annotation contradiction is present.

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 a single, front-loaded sentence that conveys the core operation without redundant or filler text. Every phrase contributes to understanding what the tool does.

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 tool with 10 parameters and no output schema, the description provides only a minimal operational summary. It is adequate because the schema covers most parameters, but it omits usage guidance and behavioral implications that would help an agent invoke the tool confidently.

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 description coverage is 80%, so most parameter meaning is already provided structurally. The description adds minimal parameter context by mentioning per-channel RGB tolerance and layer/frame scope, but it does not substantially extend the schema.

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 states a specific verb (replaces), resource (color), and scope (on a layer or all layers across frames). It is clear what the tool does, but it does not explicitly distinguish itself from sibling tools such as palette_edit or draw_pixels.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description gives no explicit guidance on when to use this tool instead of alternatives. It only describes the operation itself, leaving the agent to infer whether replace_color is preferable to palette_edit, draw_pixels, or other color-related siblings.

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