Skip to main content
Glama

import_spritesheet

Destructive

Slices a sprite sheet image into an animated Aseprite sprite with one frame per cell, using specified frame width, height, and horizontal, vertical, or grid layout.

Instructions

Turn a sprite sheet image into an animated sprite, one frame per cell.

The inbound seam for art made elsewhere, such as a PixelPrep strip, and the reverse of
`export_spritesheet`. Aseprite's own Import Sprite Sheet does the slicing.

Args:
    filename: The .aseprite file to create.
    source: The sheet: a PNG, or anything else Aseprite opens, in the workspace.
    frame_width: One cell's width in pixels.
    frame_height: One cell's height in pixels. Both must divide the sheet exactly in
        the direction the layout reads it: a partial cell is refused, never cropped
        or padded, and the refusal names the sizes that would divide.
    layout: "horizontal" reads one row left to right, so frame_height must be the
        sheet's height. "vertical" reads one column top to bottom, so frame_width
        must be its width. "grid" reads rows left to right, top to bottom.
    overwrite: Replace `filename` if it already exists (default False = no-clobber).

The sprite is one cell in size, with one layer holding every frame, in the sheet's
colour mode and palette. An opaque sheet keeps its Background layer, which on an
indexed sheet is what keeps the colour at the transparent palette index visible.
Frames are 100ms: time them with `set_all_frame_durations` or `apply_timing_curve`.
A cell with nothing in it still becomes a frame, and `empty_frames` lists them, so a
grid's spare cells are visible as such. A sheet with frames of its own, such as a
GIF, is refused rather than sliced from its first frame. At most 4,096 frames.

Returns the sprite's info, plus `layer` and `empty_frames`.

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": {
      "filename": "<filename>",
      "source": "<source>",
      "frame_width": "<frame_width>",
      "frame_height": "<frame_height>"
    },
    "name": "import_spritesheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
layoutNoDefault: "horizontal".horizontal
sourceYes
filenameYes
overwriteNoDefault: false.
frame_widthYes
frame_heightYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations flag this as a non-read-only, destructive operation, and the description goes well beyond that: no-clobber default on `overwrite`, exact-division rules with refusal rather than crop/pad, refusal of sheets that already contain frames (e.g. GIFs), a 4,096-frame ceiling, and the resulting layer/palette/Background semantics. That is exactly the context an agent needs before a destructive import.

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?

It is long but well ordered: purpose and sibling relationship first, then per-argument semantics, then output/behavioural notes. The Args block is dense and mostly earns its space, though a few parenthetical asides (e.g. the indexed-palette explanation) are longer than the calling decision requires.

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 destructive, six-parameter import with no output schema, the description covers creation semantics, refusal conditions, size limits, and what is returned ('the sprite's info, plus `layer` and `empty_frames`'). Nothing an agent needs to invoke this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33%, but the description compensates fully: it defines `source` (a PNG or anything Aseprite opens), the divisibility constraint tying `frame_width`/`frame_height` to the chosen `layout`, what each layout value reads, and `overwrite`'s default and meaning. All six parameters gain meaning beyond the bare schema types.

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 opening sentence states a precise verb and resource ('Turn a sprite sheet image into an animated sprite, one frame per cell') and immediately positions it against siblings: the inbound seam for art made elsewhere and the explicit reverse of `export_spritesheet`. An agent can tell exactly what this does and what it undoes without opening the schema.

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 clear context for use ('inbound seam for art made elsewhere, such as a PixelPrep strip') and routes timing work to `set_all_frame_durations` or `apply_timing_curve`. It does not, however, distinguish itself from other import-flavoured siblings such as `import_image` or `import_reference_sequence`, so the alternative-selection guidance is strong but not exhaustive.

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

Deploy Server

Other Tools