Skip to main content
Glama

optimize_sprite

Convert oversized AI-generated sprites into game-ready pixel art: downscale with area-averaging, remove backgrounds, and crop automatically.

Instructions

Optimize an existing sprite PNG for pixel art games. Downscales large AI-generated sprites to proper pixel art resolution using area-averaging (not blurry bilinear). Also optionally removes background and crops. Use this to convert oversized "pixel art style" images into true pixel art at game-ready sizes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeYesTarget size in pixels for the longest side. Snaps to nearest standard size (16, 24, 32, 48, 64, 96, 128). Recommended: 16-24 for icons/particles, 32 for tiles, 48 for sprites, 64 for characters, 96-128 for bosses.
squareNoPad output to square (default: false)
inputPathYesPath to the input PNG file
outputPathNoOutput path (default: overwrites input)
removeBackgroundNoAuto-detect and remove background color (default: true)
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the downscaling algorithm (area-averaging vs bilinear), background removal, and cropping, which adds useful behavioral context. However, 'crops' lacks a corresponding schema parameter and is ambiguous (auto-crop to content?), and side effects like overwriting the input are only implied via schema, not described.

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 two sentences, front-loaded with purpose, and includes a critical algorithmic distinction (area-averaging, not blurry bilinear). Every sentence earns its place with no redundancy.

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 tool with 5 parameters, no annotations, and no output schema, the description covers the core workflow and gives usage context. The ambiguity around 'crops' and the unstated overwrite behavior (though in schema) create minor gaps, but overall it is sufficiently complete for an agent to select and use the tool correctly.

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 provides 100% coverage and even includes recommended sizes for the size parameter. The tool description adds no extra parameter-level detail; it merely mentions background removal and cropping, the former already in the schema and the latter not tied to any parameter.

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 clearly states the tool optimizes existing sprite PNGs for pixel art games, with specific actions like downscaling using area-averaging, background removal, and cropping. This distinct purpose is well differentiated from sibling tools such as forge_sprite (likely creation) and process_sprite (generic processing).

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 provides explicit guidance on when to use the tool: 'Use this to convert oversized pixel art style images into true pixel art at game-ready sizes.' This gives clear context, though it does not explicitly name alternatives or state exclusions, so it falls short of a 5.

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/freema/pixelforge-mcp'

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