Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ASEPRITE_PATHNoFull path to Aseprite executable. Auto-detected from Steam, standalone install, or PATH if not set.Auto-detected
ASEPRITE_MCP_TIMEOUTNoPer-operation timeout in seconds.90
ASEPRITE_MCP_WORKSPACENoFolder where relative sprite paths are resolved.<repo>/workspace

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
apply_operationsA

Apply a list of edit operations to a sprite in one atomic, single-process batch.

Each operation is `{"op": "<name>", "args": {...}}`. Supported ops (v1):
add_layer, rename_layer, set_layer_visible, set_layer_opacity, remove_layer,
add_frame, duplicate_frame, set_frame_duration, add_tag, remove_tag, set_pixel,
draw_line, draw_rectangle, fill_rectangle, draw_ellipse, fill_ellipse, fill_layer,
clear_layer, add_slice, remove_slice, replace_color. Ops run **in order against the
same open sprite**, so later ops see earlier ones (e.g. add a layer then draw on it).

Atomic: if any op fails the whole batch is rolled back and nothing is saved; the
error names the failing op index. `dry_run=True` validates the op list and returns
the plan **without launching Aseprite** (shape checks only — runtime issues like a
missing layer surface on a real run).

Returns a `workflow_manifest.v1` (kind "batch") with a per-op `operations` list.
export_pngB

Export one frame as a flattened PNG.

Args:
    output: Destination .png path.
    frame: Frame to export, 1-based (default 1).
    scale: Integer upscaling factor (default 1).
    overwrite: Replace `output` if it already exists (default False = no-clobber).
export_gifB

Export the full animation as an animated GIF (honours frame durations & tags).

overwrite: Replace `output` if it already exists (default False = no-clobber).
export_tag_gifB

Export only the frames of a named animation tag as an animated GIF.

overwrite: Replace `output` if it already exists (default False = no-clobber).
export_spritesheetA

Export frames into a single sprite-sheet image.

Args:
    output: Destination sheet image (.png).
    sheet_type: one of horizontal, vertical, rows, columns, packed.
    scale: Integer upscaling factor.
    data_output: Optional .json path to also write frame/tag/slice metadata
        (JSON-array format) describing each frame's rectangle in the sheet.
    padding: Pixels of padding around/between frames.
    layer: Only include this layer.
    ignore_layer: Exclude this layer (e.g. a "reference" layer).
    split_layers: Lay out each layer as separate cels in the sheet.
    split_tags: Treat each tag as a separate set in the sheet.
    overwrite: Replace existing output(s) (default False = no-clobber). When
        data_output is given, both files are checked before anything is written.
export_layerB

Export a single layer of one frame as a PNG (others excluded).

export_layersA

Export each layer to its own image file.

output_pattern must contain "{layer}" (e.g. "layers/{layer}.png"); add
"{frame}" too for animations. include_hidden also exports hidden layers.
export_tagsB

Export each animation tag's frames to their own files.

output_pattern must contain "{tag}" (and usually "{frame}"),
e.g. "anim/{tag}_{frame}.png".
export_onion_skinA

Export a frame with neighbouring frames ghosted behind it (onion skin).

Args:
    frame: The in-focus frame (drawn fully opaque), 1-based.
    previous, next: How many earlier/later frames to ghost.
    ghost_opacity: Max opacity (0-255) of the nearest ghost; further frames fade.
    scale: Integer upscaling factor for the output PNG.
export_framesB

Export each frame to its own image file.

output_pattern must contain "{frame}" (and optionally "{tag}", "{layer}"),
e.g. "frames/walk_{frame}.png". Aseprite substitutes the values.
import_imageA

Create an editable .aseprite sprite from a flat image (.png/.bmp/.jpg/...).

Args:
    input_image: Source raster image.
    output: Destination .aseprite path.
get_sprite_infoB

Return structured info about a sprite: size, colour mode, frames (with durations), the full layer tree (names, opacity, blend mode, visibility), animation tags, and palette size.

render_previewA

Render a single frame to a PNG and return it as an image you can view.

Use this to *see* your work. frame is 1-based; scale enlarges small sprites
(default 8x) so individual pixels are visible.
get_pixelsA

Read the composited (all visible layers) pixel colours of a region.

Returns rows of "#RRGGBBAA" hex strings. The region is capped at 64x64 (4096 pixels) per call to keep responses small — read in tiles for bigger areas.

list_spritesB

List sprite/image files in the workspace directory.

export_godot_spriteframesA

Export a sprite as a Godot 4 SpriteFrames resource (.tres) + a packed sheet.

Produces three files: a packed PNG sprite sheet, its JSON frame/tag metadata, and a
``SpriteFrames`` .tres that references the sheet via ``AtlasTexture`` regions — one
Godot animation per Aseprite tag (or a single ``default`` animation if untagged), with
per-frame timing taken from Aseprite frame durations.

v1 emits ``SpriteFrames`` only (no pivot/origin/hitbox/9-slice). Aseprite tag direction
isn't represented (Godot animations only loop or not); ``default_loop`` is applied to all.

Args:
    output: Destination .tres path (workspace-relative).
    sheet_output: Sheet PNG path. Defaults to ``<output stem>.png`` beside the .tres.
    scale: Integer upscaling factor for the sheet.
    texture_res_path: The ``res://`` path of the sheet inside your Godot project (the
        AtlasTexture atlas). Defaults to ``res://<sheet filename>`` (same-folder import).
    default_loop: ``loop`` flag for every generated animation (default True).
    overwrite: Replace existing outputs (default False = no-clobber). All three targets
        are validated up front, so nothing is written if any already exists.

Returns a ``workflow_manifest.v1`` manifest (kind ``engine_preset``).
export_slice_metadataA

Export every slice as engine-agnostic JSON (aseprite_mcp.slice_metadata.v1).

Each slice becomes ``{name, type, id, bounds, pivot, nine_slice, color, data,
raw_data}``. **Type detection:** a slice's user-data JSON ``type`` wins; otherwise the
name convention ``<type>:<id>`` (recognized types: hitbox, hurtbox, collision, interact,
pivot, origin, attach, spawn, nine_slice — anything else becomes ``"custom"``, never an
error). ``id`` comes from the data ``id`` or the name's ``:<id>`` suffix. ``nine_slice``
(Aseprite's 9-patch center) and ``pivot`` are emitted whenever the slice has them. Slice
user-data that is valid JSON is parsed into ``data``; the raw string is kept in ``raw_data``.

Args:
    output: Destination .json path. Defaults to ``<sprite>_slices.json`` beside the sprite.
    overwrite: Replace an existing file (default False = no-clobber).

Returns a ``workflow_manifest.v1`` manifest (kind ``engine_metadata``).
get_paletteA

Return the sprite's palette as a list of "#RRGGBBAA" colours.

set_paletteA

Replace the entire palette with the given list of colours.

colors: list of colour strings, e.g. ["#000000", "#ffffff", "255,0,0"].
set_palette_colorB

Set a single palette entry by index (0-based). Grows the palette if needed.

add_palette_colorC

Append a colour to the end of the palette.

resize_paletteA

Resize the palette to size entries (new entries are black).

load_paletteB

Load a palette from a file (.gpl, .pal, .aseprite, .png, ...) and apply it.

extract_paletteA

Extract the unique colours used in a sprite (or another image).

Args:
    from_image: Optional image/sprite to scan instead of `filename`.
    set_as_palette: Apply the extracted colours as `filename`'s palette.
    include_alpha: Treat differing alpha as distinct colours (default off).
    max_colors: Error out if more unique colours than this are found.

Returns the list of "#RRGGBBAA" colours found.
sort_paletteA

Sort the palette by "hue", "luminance" (default), "saturation", or "value".

For indexed sprites the pixel indices are remapped so the image looks identical.

generate_rampA

Generate a shading ramp from a base colour (dark -> light).

Produces `steps` colours by varying lightness across `light_range`, optionally
rotating hue by `hue_shift` total degrees across the ramp (classic pixel-art
hue shifting: cool shadows / warm highlights) and scaling saturation by
`saturation_shift` percent across the ramp.

Args:
    filename: If set with apply, write the ramp into that sprite's palette.
    apply: "none" (just return), "append" (add to palette), or "replace".

Returns the ramp as a list of "#RRGGBB" colours (darkest first).
set_transparent_colorC

Set which palette index is treated as transparent (indexed sprites only).

add_sliceC

Create a slice (named region) at (x, y, width, height).

Args:
    center_*: Optional 9-patch center rectangle, **relative to the slice's
        top-left**. Provide all four to mark the stretchable middle.
    pivot_*: Optional pivot point (relative to the slice).
    color: Optional slice colour shown in the editor.
    data: Optional user data string.
set_sliceB

Update an existing slice's bounds, name, colour, or data.

remove_sliceC

Delete a slice by name.

list_slicesB

List all slices in the sprite with their bounds, center, and pivot.

get_celA

Inspect a cel: whether it exists, its position, bounds, and opacity.

set_cel_positionC

Move a cel's image to position (x, y) within the canvas.

set_cel_opacityC

Set a cel's opacity (0-255).

copy_celB

Copy a cel's image (and position) from one frame to another on the same layer.

delete_celC

Delete a cel (the layer becomes empty at that frame).

draw_pixelsA

Plot individual pixels.

Args:
    pixels: List of {"x": int, "y": int, "color": "#hex"?}. If a pixel omits
        "color", the shared `color` argument is used.
    color: Default colour for pixels that don't specify their own.
    layer: Target layer name or 1-based index (default: top layer).
    frame: Target frame, 1-based (default 1).
draw_lineA

Draw a straight line from (x1,y1) to (x2,y2).

Args:
    pixel_perfect: Remove L-shaped corner pixels for a clean 1px pixel-art line.
    antialias: Smooth (Xiaolin Wu) line with alpha blending — RGB sprites only;
        ignored on indexed/gray. Takes precedence over pixel_perfect.
draw_polylineB

Draw connected line segments through a list of points.

points: list of {"x": int, "y": int}. Set closed=True to connect the last
point back to the first (outline a polygon). pixel_perfect removes L-corner
pixels across the whole path for a clean pixel-art outline.
draw_curveB

Draw a quadratic Bézier curve from (x0,y0) to (x1,y1) bending toward the control point (control_x, control_y). steps controls smoothness.

draw_rectangleC

Draw a rectangle. filled=False draws a 1px outline, True fills it.

draw_ellipseA

Draw an ellipse centred at (center_x, center_y) with the given radii.

For a circle, use the same value for radius_x and radius_y. filled=False
draws a 1px outline. antialias smooths a *filled* ellipse with sub-pixel
coverage (RGB sprites only; ignored otherwise).
fill_areaB

Flood fill (paint bucket): replace the contiguous region of matching colour starting at (x,y) on the target layer with color.

fill_layerC

Fill the entire target layer/frame cel with a solid colour.

clear_layerC

Erase the target layer/frame cel to full transparency.

fill_gradientB

Fill a region with a gradient.

Args:
    colors: 2+ colour stops, e.g. ["#000000", "#ff004d", "#ffec27"], spread
        evenly. For dither=True, provide exactly 2 colours.
    gradient_type: "linear" or "radial".
    angle: Direction in degrees for linear gradients (0 = left->right).
    dither: Ordered (Bayer 4x4) dithering between 2 colours instead of smooth
        interpolation — great for limited palettes / retro looks.
    x, y, width, height: Region (defaults to the whole canvas).
add_outlineC

Add a pixel outline around the artwork on a layer.

Args:
    color: Outline colour.
    thickness: Outline width in pixels (default 1).
    connectivity: 4 (orthogonal only) or 8 (includes diagonals, default).
    where: "outside" (grow into transparency, default) or "inside"
        (recolour the shape's border pixels).
add_drop_shadowB

Add a hard drop shadow for a layer's artwork on a new layer placed beneath it.

Args:
    layer: The layer casting the shadow.
    offset_x, offset_y: Shadow offset in pixels.
    color: Shadow colour (often semi-transparent black, the default).
    opacity: Opacity (0-255) of the shadow layer.
    frame: Frame to build the shadow for.
replace_colorA

Replace every pixel matching from_color (within tolerance per channel) with to_color, on the chosen layer + frame.

invert_colorsC

Invert the RGB colours of a layer's pixels (alpha preserved).

adjust_brightness_contrastB

Adjust brightness (-255..255, additive) and contrast (-255..255) of a layer.

adjust_hue_saturationB

Shift hue (degrees) and scale saturation/lightness (percent, -100..100).

desaturateC

Desaturate toward grayscale by amount percent (0-100).

fill_checkerboardC

Fill a region with a 2-colour checkerboard of size-pixel squares.

add_frameA

Append a new frame to the animation.

Args:
    duration_ms: Frame duration in milliseconds (default 100).
    copy_from: If given (1-based), duplicate the content of that frame;
        otherwise the new frame is empty.

Returns the new frame number and updated frame count.
duplicate_frameB

Duplicate an existing frame (1-based); the copy is inserted after it.

remove_frameA

Delete a frame (1-based). The sprite must have more than one frame.

set_frame_durationB

Set a single frame's duration in milliseconds (1-based frame).

set_all_frame_durationsA

Set every frame's duration in milliseconds (uniform animation speed).

add_layerA

Add a new (empty) normal layer on top of the stack.

Args:
    name: Layer name.
    group: Optional name of an existing group layer to nest the new layer in.
    opacity: 0-255.
    blend_mode: normal, multiply, screen, overlay, darken, lighten,
        color_dodge, color_burn, hard_light, soft_light, difference,
        exclusion, hue, saturation, color, luminosity, addition, subtract, divide.
    visible: Initial visibility.
add_group_layerA

Add a new (empty) group layer on top of the stack. Nest layers into it with add_layer(group=...) or move_layer(group=...).

remove_layerA

Delete a layer (or group, including its children) by name or 1-based index.

rename_layerC

Rename a layer.

set_layer_propertiesB

Update one or more layer properties. Only the arguments you pass are changed.

move_layerA

Reorder a layer to a new 1-based stack index (1 = bottom-most).

Note: moves within the layer's current parent group.
duplicate_layerA

Duplicate a layer (including its cels) as a new layer on top.

merge_layer_downC

Merge a layer down into the layer directly beneath it.

create_spriteA

Create a new sprite file and save it.

Args:
    filename: Output path. Relative paths go in the workspace. Use a
        .aseprite/.ase extension to keep layers & frames editable.
    width, height: Canvas size in pixels (1-65535).
    color_mode: "rgb" (default), "indexed", or "gray".
    background: Optional fill colour for the first layer (e.g. "#1d2b53").
        Omit for a transparent canvas.
    overwrite: Replace `filename` if it already exists (default False = no-clobber).

Returns the new sprite's structured info.
save_sprite_asA

Save a copy of a sprite under a new path (optionally flattened).

The original file is left untouched. Useful for exporting an editable
.aseprite to another .aseprite, or snapshotting a version.

overwrite: Replace `new_filename` if it already exists (default False = no-clobber).
set_color_modeA

Convert a sprite between colour modes ("rgb", "indexed", "gray").

When converting to "indexed", dithering can be "none", "ordered", or "old" to control how RGB colours are mapped to the palette.

resize_canvasA

Resize the canvas WITHOUT scaling the artwork (adds or trims space).

anchor controls where existing content sits in the new canvas:
"top_left" (default) or "center".
crop_spriteA

Crop the canvas to the rectangle (x, y, width, height).

scale_spriteB

Scale the whole sprite (artwork included).

Provide either `factor` (e.g. 2.0 to double) OR explicit `width`/`height`.
method: "nearest" (crisp pixels, default) or "bilinear" (smooth).
flatten_spriteC

Flatten all layers into a single layer (in place).

trim_spriteA

Auto-crop the canvas to the bounding box of all non-transparent content (across every frame).

convert_layer_to_backgroundC

Convert a normal layer into the sprite's opaque Background layer.

convert_background_to_layerB

Convert the Background layer back into a normal (transparent-capable) layer.

add_tagC

Create an animation tag spanning frames [from_frame, to_frame] (1-based).

direction: "forward" (default), "reverse", "pingpong", or "pingpong_reverse".
color: optional tag colour (shown in the timeline).
remove_tagC

Delete an animation tag by name.

set_tagA

Update an existing tag. Only the arguments you pass are changed.

Note: changing from_frame/to_frame recreates the tag in place to update its
range reliably across Aseprite versions.
create_tilemap_layerC

Create a tilemap layer with an empty grid.

Args:
    name: Layer name.
    tile_width, tile_height: Tile size in pixels (sets the sprite grid).
    columns, rows: Grid size in tiles (default: enough to cover the canvas).
add_tileB

Add a new tile to the layer's tileset (optionally filled with a solid colour). Returns the new tile's index.

fill_tileC

Fill an existing tile's artwork with a solid colour.

paint_tile_pixelsC

Draw individual pixels into a tile's artwork (tile-local coordinates).

pixels: list of {"x", "y", "color"?}; falls back to the shared `color`.
set_tileA

Place a tile (by tileset index, 0 = empty) at grid cell (column, row).

set_tilesB

Place many tiles at once. tiles: list of {"column", "row", "index"}.

fill_tilemapC

Fill the entire tilemap grid with a single tile index.

get_tilemapB

Read the tilemap as a 2D grid of tile indices, plus tile size and count.

create_character_spriteA

Scaffold a character sprite project: a transparent canvas with a tidy layer stack (body + details), an auto-generated shading palette ramp from base_color, and (optionally) an outlined placeholder body to draw over.

Returns a ``workflow_manifest.v1`` manifest (sprite summary, created files,
palette, and suggested next actions).
make_4_frame_idle_animationA

Turn a single-frame sprite into a 4-frame idle "bob" loop.

Duplicates frame 1 to 4 frames, nudges `layer` down by `bob_pixels` on frames 2
and 4 for a subtle bob, sets uniform durations, and adds a looping tag.

Returns a ``workflow_manifest.v1`` manifest (sprite summary + animation block).
create_tileset_projectA

Scaffold a tilemap project: a canvas sized columns×rows tiles, a tilemap layer, and a starter tileset (grass/dirt/water/stone by default, or your own [{"name","color"}] list). The grid is filled with the first tile to start.

Returns a ``workflow_manifest.v1`` manifest with a tilemap block mapping tile
names to their tileset indices.
export_game_asset_bundleA

Export a sprite into a game-ready bundle directory: a flattened PNG, an animated GIF, a packed sprite sheet (+ JSON data), a GIF per animation tag, and a manifest.json describing everything.

Args:
    overwrite: Replace existing bundle files (default False = no-clobber). Every
        planned output is checked up front, so the bundle fails before writing any
        file if a target already exists.

Returns a ``workflow_manifest.v1`` manifest (the same object is also written to
disk as manifest.json inside the bundle).
validate_sprite_for_game_exportA

Check whether a sprite is game-ready against the criteria you specify.

Runs a series of checks — does the file open, do dimensions match (exactly or as
a tile multiple), is the colour mode allowed, are frame counts / required animation
tags present, is the background transparent, is the palette within budget, do
expected export files exist, and is sprite-sheet metadata readable — plus soft
warnings for oversized canvases, missing tags, and default/blank layer names.

All criteria are optional; only the ones you pass are enforced. Returns a
``workflow_manifest.v1`` manifest (kind "validation") with a `validation` section
`{passed, checks[], errors[], warnings[]}`. `validation.passed` is the verdict;
`ok` just means the check ran.
create_icon_setA

Scaffold an icon set: a grid sheet with count icon cells, each a placeholder inside a named slice (icon_0, icon_1, …) for easy atlas export.

Returns a ``workflow_manifest.v1`` manifest (kind "icon_set"); the per-icon regions
appear as slices under `sprite.slices`.
create_rpg_item_sheetA

Scaffold an RPG item sheet: a grid sheet with one named slice per item (default sword/shield/potion/coin/key/gem), each with a placeholder.

Returns a ``workflow_manifest.v1`` manifest (kind "rpg_item_sheet"); item regions
appear as slices (named after each item) under `sprite.slices`.
make_8_direction_walk_templateB

Scaffold an 8-direction walk-cycle template on an existing sprite: enough frames for frames_per_direction per direction, with one animation tag per direction (N, NE, E, SE, S, SW, W, NW by default).

Frames are placeholders to draw over. Returns a ``workflow_manifest.v1`` manifest
(kind "walk_template") with an animation block listing the directions/tags.
validate_asset_specA

Validate an aseprite_mcp.asset_spec.v1 document (does the spec make sense?).

Checks the schema, kind, canvas, per-kind fields, palette, layers, animations
(`frame_count`, not `frames`), slices, and export formats. Returns a
``workflow_manifest.v1`` (kind ``asset_spec``) with a `validation` block
`{passed, checks, errors, warnings}`. This does **not** check a finished sprite against
the spec — that's a separate future tool.
plan_asset_specA

Return the ordered build steps for an asset spec without launching Aseprite.

The pure dry-run: each step is ``{tool, args, purpose}`` naming the existing tool that
`build_asset_from_spec` would call. Returns a ``workflow_manifest.v1`` (kind
``asset_spec``) with the steps under `plan` and `dry_run=true`. If the spec is invalid,
returns the validation report instead.
build_asset_from_specA

Build the asset described by an aseprite_mcp.asset_spec.v1 document.

Executes the (validated) plan by dispatching each step to an existing tool: scaffolds
the sprite for its `kind`, applies palette / extra layers / animation frames+tags /
slices, and runs the requested exports. **Structure only — no pixels are drawn;** the
returned manifest's `suggested_next_actions` hand the actual art back to you.

Args:
    overwrite: Passed to the export steps (replace existing export files). The sprite
        itself is created no-clobber, so building over an existing ``<name>.aseprite``
        raises — build to a new name or remove the old file.

Returns a ``workflow_manifest.v1`` (kind ``asset_spec``) with the created files, the
executed `plan`, and next actions. Raises ``ValidationFailed`` if the spec is invalid.
draw_brushA

Stamp a custom brush shape at a list of points.

Args:
    brush: The brush as rows of characters. Any character other than space,
        '.', or '0' is a filled cell. e.g. a plus brush: ["010", "111", "010"].
    points: Positions to stamp at, list of {"x": int, "y": int}.
    color: Colour to stamp the brush in.
    anchor: "center" (default) or "topleft" — where each point sits in the brush.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/MalloyTheDev/aseprite-mcp'

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