Skip to main content
Glama

export

Render sprites to PNG, GIF, WebP, BMP, TGA or QOI with optional frames, tags, layers, scaling and background. Writes each frame to its own file and reports the files, size and bytes written.

Instructions

Render the sprite to .png, .gif, .webp, .bmp, .tga or .qoi; the sprite is not changed.

.gif and .webp hold an animation: by default every frame, with the frame durations (gif loops forever, alpha is 1-bit). The other formats hold one image: by default frame 1; when several frames are exported each goes to its own file named after the frame number, e.g. walk.png with frames "1-3" writes walk_1.png, walk_2.png and walk_3.png (no walk.png). Pass frames or tag, not both; a tag's frames are exported in order whatever its direction. Hidden layers are left out; with layer, only that layer (or group) is shown, even when it is hidden, with its opacity and blend mode. The output folder must exist; existing files are refused unless overwrite is true. Files are written completely or not at all. One call writes at most 67108864 pixels, all frames and the scale counted. Not available in batch. Returns the files written, the frames, the image size and total bytes.

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": {
      "path": "<path>",
      "output": "<output>"
    },
    "name": "export"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNoExport this tag's frames
pathYesSprite file. Relative paths resolve against the server root.
layerNoExport only this layer or group, shown alone
scaleNoOutput pixels per sprite pixel (nearest)
framesNoFrames: a number, "1-4", "1-4,7" or "all"; default see below
outputYesImage file to write; the extension picks the format
overwriteNoReplace files that already exist
backgroundNoColour behind transparent pixels; default none

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full load and does so thoroughly: atomicity ('written completely or not at all'), overwrite refusal on existing files, a hard 67108864-pixel cap counting frames and scale, gif looping forever with 1-bit alpha, hidden-layer exclusion, and the requirement that the output folder pre-exist.

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 the verb and formats, then layers on format-specific, naming, safety and limit rules in a logical order. Nearly every clause adds information, though the dense parenthetical style and long final sentence cost some readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An 8-parameter tool with real constraints is covered end to end: dimensions of size limits, overwrite semantics, layer/tag interaction, and file naming. It even summarizes the return payload despite an output schema existing, leaving nothing an agent needs before calling.

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 100%, so baseline is 3, but the description adds cross-parameter meaning the schema cannot express: frames and tag are mutually exclusive, multi-frame output is named walk_1.png/walk_2.png with no walk.png, tag frames export in order regardless of direction, and layer overrides visibility with its own opacity/blend.

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?

States a specific verb ('Render the sprite') and enumerates the exact output formats, plus a key invariant ('the sprite is not changed'). It does not name the obvious siblings (export_layers, export_spritesheet), so the agent must infer differentiation from the format list alone.

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?

Gives concrete selection rules: frames vs tag are mutually exclusive, gif/webp hold animations while other formats hold one image, and it is 'Not available in batch'. It stops short of contrasting itself with sibling export tools, so the alternative-selection guidance is implied rather than explicit.

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