Skip to main content
Glama

canon_init

Generates a sprite-canon.json config file that sets palette, regions, scale, and check thresholds for sprite projects. Learns the palette from sample images, filtering rare noise colors.

Instructions

Create sprite-canon.json for a project: the single source of truth for palette, regions, scale and check thresholds. Learns the palette from sample images (colours used at least minCount times; rarer colours are usually anti-aliasing noise). Run once per project, then commit the file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirYesproject directory to create sprite-canon.json in
nameNoproject name
cellHNospritesheet cell height (PNG sheets only)
cellWNospritesheet cell width (PNG sheets only)
minCountNomin occurrences for a colour to enter the palette (default 4)
sampleFilesNoPNG/GIF files or directories to learn the palette from
updatePaletteNorelearn just the palette of an EXISTING canon from sampleFiles (regions/scale/checks untouched)
Behavior4/5

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

With no annotations provided, the description carries the full transparency burden. It discloses the file-creation behavior and the palette-learning algorithm: colors must occur at least minCount times, rarer colors are usually anti-aliasing noise. It could go further by stating what happens if the file already exists, but the described behavior is substantive and not hidden.

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 only three sentences, front-loads the main purpose, and each sentence contributes meaningful information. There is no filler or repetition of the input 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?

Given 7 parameters and no output schema, the description provides the essential context: what file is created, what data it encodes, how the palette is learned, and when to run the tool. It omits edge-case guidance such as behavior with an existing sprite-canon.json, but the schema compensates for parameter-level detail.

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 schema description coverage is 100%, so the baseline is 3. The description adds useful context around the palette-learning threshold meaning of minCount, but it does not map parameters or clarify options like updatePalette beyond what the schema already provides.

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 opens with a specific verb and resource: 'Create sprite-canon.json for a project', and explains that the file is the single source of truth for palette, regions, scale, and thresholds. It is clear and not tautological, though it never explicitly contrasts itself with sibling tools like canon_learn.

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

Usage Guidelines4/5

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

It gives strong lifecycle guidance: 'Run once per project, then commit the file', which tells the agent initialization is a one-time action per project. It does not explicitly state when not to use this tool or when to prefer a sibling like canon_learn for updating an existing canon.

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