Skip to main content
Glama

replace_color

Replace all pixels of a given palette index with another palette index on a layer, optionally restricted to a specific region.

Instructions

Replace every pixel of one palette index with another on a layer (palette untouched). Optionally restricted to a region.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frameNoFrame index, 0-based (default: active frame)
layerNoLayer id or name (default: active layer)
doc_idYesDocument id
regionNoRegion: exactly one of 'rect', 'pixels', or 'selection'
renderNoInclude a render of the change (default true)
to_indexYes
from_indexYesPalette index
Behavior3/5

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

With no annotations, the description adds some behavioral context (palette untouched, region restriction) but lacks details on side effects (e.g., pixel modification is permanent, undo behavior, or performance implications). Adequate but not thorough.

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?

Single sentence efficiently conveys core purpose and optional region feature. No fluff, front-loaded with key action.

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 moderate-complexity tool (7 params, nested region, no output schema), the description covers the main operation and key option. Could mention that it modifies layer in place, but overall sufficient.

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 high (86%); description adds marginal value beyond schema. It contextualizes region restriction but does not elaborate on parameter meanings beyond what schema already provides.

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?

Description clearly states the tool replaces pixels of one palette index with another on a layer, specifies palette is untouched, and mentions optional region restriction. This distinguishes it from siblings like set_palette_color or swap_palette_indices.

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?

Description implies usage for color replacement without modifying palette, but does not explicitly state when to use vs. alternatives like swap_palette_indices or set_palette_color. No when-not or alternative references.

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/ehm-93/pixel-mcp'

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