Skip to main content
Glama

sprite_repaint

Recolor a canon sprite region onto a dark-to-light color ramp deterministically, preserving shading and silhouette. Use it to create consistent color variants instead of regenerating the image.

Instructions

Deterministically recolour a canon region onto a colour ramp (dark→light hex list) — the alternative to regenerating with AI and losing consistency. Shading survives (luminance maps onto the ramp using the region's FIXED recorded range), silhouettes never change, protected regions are never touched, and the same input always gives the same output. Use maskFromFile when repainting an already-recoloured variant: regions are matched on the original (identical pixel layout), paint is applied to the variant. Writes to outFile (never overwrites the input unless outFile equals it).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
rampYeshex colours dark→light, e.g. ['4a3418','7a5628','a8813c','cfae6b']
rowsNorestrict painting to this row range [from,to]
cellHNospritesheet cell height (PNG sheets only)
cellWNospritesheet cell width (PNG sheets only)
regionYescanon region to repaint
outFileYes
canonPathNopath to sprite-canon.json (default: search upward from the target file)
maskFromFileNomatch the region on this file instead (same pixel layout)
Behavior5/5

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

With no annotations, the description carries full weight. It discloses determinism, luminance mapping via fixed recorded range, silhouette invariance, protection of regions, and write behavior (never overwrites input unless identical outFile). These are behavioral promises beyond what the schema reveals, giving the agent a reliable mental model.

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 slightly long but every sentence contributes: purpose, guarantees, variant guidance, output behavior. It front-loads the core purpose and packs the rest efficiently. No filler, though the length might be trimmed without losing information.

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 9-parameter tool with no output schema, the description covers the essential behavior: determinism, shading preservation, masks, and file output. It does not explain what the resulting file contains (e.g., format, dimensions) but those are likely inferred from input. The clerical params (rows, cell dimensions, canonPath) are not discussed, but they are not core to understanding the tool's function. Overall, an agent can call it correctly based on this text.

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 78%, so baseline is 3. The description adds meaning for ramp (dark→light hex list), maskFromFile (explains variant matching and paint application), and outFile (overwrite rule). It does not elaborate on rows, cellH/W, or canonPath, but those have schema hints and are auxiliary. Overall it enriches several key parameters beyond schema text.

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?

The description opens with a precise verb–resource pair (“Deterministically recolour a canon region”) and immediately contrasts it with AI regeneration, clearly marking scope and intent. The explicit mention of maskFromFile and outFile behavior also disambiguates it from sibling tools like sprite_verify or sprite_measure.

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

Usage Guidelines5/5

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

It states the primary use case (deterministic recolor vs. AI) and gives an explicit directive for a specific parameter: “Use maskFromFile when repainting an already-recoloured variant.” It also explains the region-matching logic and when outFile may overwrite the input. This is concrete, actionable guidance beyond generic 'when 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/useka12-eng/sprite-canon'

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