Skip to main content
Glama

pixel_replace_color

DestructiveIdempotent

Replace every pixel of one exact color with another across the canvas for palette swaps and recoloring sprites.

Instructions

Replace every pixel of one exact color with another across the canvas.

Useful for palette swaps and recoloring sprites. Matching is exact RGBA. Returns JSON {"canvas", "find", "replace", "pixels_changed"}; plus a rendered image when preview=true. On failure returns "Error: ...".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes
Behavior3/5

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

Annotations already declare destructiveHint: true and idempotentHint: true. The description adds the return structure (JSON with fields and preview option) and error handling. It does not contradict annotations. However, it does not explicitly state that the canvas file is modified in place, though that is implied by 'across the canvas' and the destructive hint.

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 description is three sentences and well-structured: first sentence states the core action, second adds use cases, third covers return value and error. There is no fluff, and it is front-loaded with the main purpose.

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?

The description covers return format and error, but does not explain whether the canvas is modified in place (though annotations indicate destructive). It also doesn't mention idempotency despite the hint. With no output schema, the description partially fills the gap by listing return fields. For a simple color replacement tool, this is adequate but not comprehensive.

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?

The input schema provides descriptions for all parameters (find, path, preview, replace) with format hints. The description adds that matching is exact RGBA, which is helpful but not critical. Since schema descriptions are present and detailed, the description does not add significant new semantics beyond clarifying exact matching.

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 clearly states the action ('Replace every pixel of one exact color with another across the canvas') and the resource (canvas). It mentions 'palette swaps and recoloring sprites' for context, but does not explicitly distinguish from sibling tools like pixel_flood_fill or pixel_apply_palette. The purpose is clear and specific.

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?

The description gives a usage indication ('Useful for palette swaps and recoloring sprites') and notes exact RGBA matching. However, it lacks guidance on when not to use this tool versus alternatives, or prerequisites such as the canvas file needing to exist. No explicit when-to-use versus when-not-to-use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/light-vp/pixelart-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server