Skip to main content
Glama

export_layers

Export each pixel-containing layer of one frame as a canvas-sized PNG with layer opacity and blend mode applied, safe filenames, hidden-layer control, and overwrite protection.

Instructions

Write one canvas-sized PNG per layer of one frame; the sprite is not changed.

Every layer that holds pixels is exported, layers inside groups too; groups themselves get no file. Each layer is shown alone with its opacity and blend mode. Files are named after the layer path ("arms/left" -> arms_left.png) with characters Windows does not allow replaced by _, reserved names such as CON prefixed with _, and _2, _3... added to repeated names. Hidden layers (or layers in hidden groups) are skipped and listed unless include_hidden is true. Existing files are refused unless overwrite is true. Not available in batch.

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_dir": "<output_dir>"
    },
    "name": "export_layers"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.
frameNo1-based frame to export
overwriteNoReplace files that already exist
output_dirYesFolder for the PNG files; created when missing
include_hiddenNoExport hidden layers too

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full disclosure burden and does so thoroughly: source sprite is never modified, group containers get no file while grouped layers do, each layer renders alone with its opacity and blend mode, and existing files fail rather than silently overwrite. It also documents the OS-level filename sanitization rules (Windows-invalid characters, reserved names like CON, _2 suffixes for collisions), which an agent could not infer from the schema.

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 output contract is front-loaded in sentence one, followed by scoping, naming, and safety rules in a tight sequence. Every sentence conveys a distinct behavioral fact; the naming edge cases are verbose but materially affect what the agent will find on disk.

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?

For a multi-file export tool with five parameters, the description covers modification safety, layer selection semantics, naming, collision handling, and a hard availability constraint. Return values need not be explained because an output schema exists, and the note that skipped layers are 'listed' implies where that information surfaces.

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 the baseline is 3, but the description goes beyond the schema by explaining the consequences of include_hidden (skipped layers are reported) and overwrite (files are refused by default). It does not elaborate on 'frame' or 'path' resolution beyond what the schema already states.

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 first sentence states a precise verb+resource: write one canvas-sized PNG per layer of one frame, and notes the sprite itself is unchanged. That per-layer scope inherently separates it from the whole-sprite 'export' and 'export_spritesheet' siblings, and 'Not available in batch' further distinguishes it from the batch tool.

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 conditions: hidden layers are skipped and listed unless include_hidden is true, existing files are refused unless overwrite is true, and the tool cannot be used in batch mode. It stops short of naming an alternative tool for the excluded batch case, which keeps it from a 5.

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