Skip to main content
Glama

palette_swap

Destructive

Recolor exact colors across all layers and frames by mapping source hex values to target colors, with optional output path. Use it to create character variants, team colors, and seasonal tilesets.

Instructions

Recolor exact colors across all layers and frames, e.g. {"#38b764": "#b13e53"}. Writes to out_path, or overwrites the source when omitted. Useful for character variants, team colors and seasonal tilesets.

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>",
      "mapping": "<mapping>"
    },
    "name": "palette_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
mappingYes
out_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and readOnlyHint=false; the description adds the key operational detail that omitting out_path overwrites the source file, which is exactly the destructive consequence an agent needs to know. It does not say what happens to unmatched colors or whether the write is atomic, so it stops short of a 5.

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?

Three tight sentences, front-loaded with the action and an example, followed by the output-destination rule and use cases. No filler or redundant restatement of the schema.

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 3-param mutation tool with a nested mapping object and no output schema, the description supplies the mapping format and destination semantics that the bare schema lacks. Failure modes (invalid hex, partial matches) remain unaddressed, which is the only real gap.

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 0%, so the description must carry the load, and it largely does: the mapping parameter is demonstrated with a concrete {"#38b764": "#b13e53"} example and out_path is explained including the null default's overwrite behavior. Only `path` is left implicit as the source file.

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?

"Recolor exact colors across all layers and frames" states a specific verb (recolor) and resource (colors across layers/frames), and the inline mapping example makes the operation concrete. It does not explicitly contrast with the sibling set_palette, so an agent must infer that set_palette defines a palette while this one substitutes colors.

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?

Use cases are given (character variants, team colors, seasonal tilesets), which implies when to reach for it. There is no explicit when-not guidance, no prerequisites, and no routing to set_palette for palette-definition tasks, so the agent is left to infer the boundary.

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