Skip to main content
Glama

png_to_dcc

Convert PNG images into Legacy Diablo II DCC sprites, with palette matching, trimming and optional colour reduction. Verify the result in game before shipping.

Instructions

Encode PNG pictures on this machine as a Legacy Diablo II DCC sprite (the compressed format of character, monster, missile and object animations). The result is decoded again before it's written and must match pixel for pixel; files made this way have NOT been confirmed in the game itself, so test in game, and keep the DC6 route (png_to_dc6) in mind where the game accepts either. pngs_or_sheet, out, palette, palette_dir, directions, frames_per_direction, offsets, overwrite: as for png_to_dc6; colours are matched to the palette the same way. For a sheet written by sprite_to_png, pass the directions, frames_per_direction and offsets its reply gave. trim: cut each frame down to its opaque pixels and move its offsets to match (default; a DCC stores a box per frame, and sheet cells are mostly empty). reduce_colours: a DCC stores pixels in cells of about 4x4, each holding at most 4 colours counting transparency. Art decoded from a DCC already fits. Other art usually doesn't: it's refused, with the number of cells over the limit, unless reduce_colours=True, which redraws the least-used colours of those cells as their nearest neighbours in the cell (lossy, and it shows on detailed art). Every direction needs the same number of frames, and a COF with the same counts. Needs Pillow (the images extra).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pngs_or_sheet": "<pngs_or_sheet>",
      "out": "<out>",
      "palette": "<palette>"
    },
    "name": "png_to_dcc"
  }
}

Input Schema

NameRequiredDescriptionDefault
outYes
trimNo
offsetsNo
paletteYes
overwriteNo
directionsNo
palette_dirNo
pngs_or_sheetYes
reduce_coloursNo
frames_per_directionNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does most of it: output is decoded and byte-compared for pixel-exactness, DCC cell colour limits cause refusals with a cell count, and reduce_colours is disclosed as lossy and visible on detailed art. It also discloses the Pillow dependency and the equal-frame-count/COF constraint. It stops short of describing overwrite/atomicity behaviour or error modes beyond the colour-limit refusal.

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?

Front-loads purpose and the in-game caveat before parameter detail, and each paragraph has a distinct job. The prose is dense and a few parentheticals run long, but no sentence is filler given the complexity of the tool.

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?

An output schema exists, so return values need not be explained, and the description still covers format, lossiness, refusal behaviour, dependency and the frame-count constraint. For a 10-parameter mutation tool with zero annotation and zero schema-description coverage, the main remaining gap is that several parameters are explained only by reference to another tool.

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 0% across 10 parameters, so the description must compensate. It names eight of them explicitly and defers their detailed semantics to png_to_dc6 ('as for png_to_dc6; colours are matched to the palette the same way'), which is a useful but indirect cross-reference. trim and reduce_colours get thorough, self-contained explanations of what they change.

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?

Opens with a specific verb and resource: 'Encode PNG pictures on this machine as a Legacy Diablo II DCC sprite,' and even glosses the format as the compressed animation format for character/monster/missile/object sprites. It distinguishes itself from png_to_dc6 by naming that sibling and stating the difference in output format.

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?

Gives explicit routing guidance: prefer the DC6 route where the game accepts either, and test in game because DCC output is unconfirmed. It also states the concrete conditions under which directions, frames_per_direction and offsets should be supplied (mirroring a sprite_to_png reply) and when reduce_colours must be turned on.

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