Skip to main content
Glama
with-pebbly

aseprite-ai-artist

by with-pebbly

Layers

layer
Destructive

Manage Aseprite layers: create, rename, reorder, group, merge, or batch multiple operations in one undoable action to build animation rigs.

Instructions

Manage layers. Ops: 'list', 'create', 'rename', 'delete', 'reorder', 'set' (visibility/opacity/blend/lock), 'group', 'ungroup', 'merge', 'duplicate', 'activate'. Pass batch to run several in one undoable action — building a rig in one call is the normal use. 'duplicate' takes an optional toSprite to copy the layer's cels into another OPEN sprite instead of this one, by frame index; frames past the target's frame count are dropped and reported. A character that will be animated wants its parts on separate layers (head, torso, arm-far, arm-near, leg-far, leg-near) before any frames exist; splitting baked pixels apart later is far more work.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opNoSingle operation. Use `batch` instead for several.
nameNo
batchNoOperations applied in order, in one undoable action. Same shape as the single-op arguments.
indexNoTarget stack position for 'reorder'; 0 is bottom.
namesNoFor 'merge' and bulk 'group'.
parentNoGroup layer to nest under.
spriteNoWhich sprite: its id as '#7' (what every result reports back, and the only unambiguous form — two unsaved documents are both called 'Sprite'), its filename, or its display name. Omit to use the sprite Aseprite has focused.
newNameNo
opacityNo
visibleNo
editableNo
toSpriteNoFor 'duplicate': copy the layer into another OPEN sprite instead of this one.
blendModeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
layersNo
spriteYes
appliedNo
duplicatedNoPresent when a 'duplicate' op in this call used `toSprite`.
activeLayerNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.0
    • addedInput schema / properties / batch / items / properties / toSprite
      Added value: +{
      +  "description": "For 'duplicate': copy the layer into another OPEN sprite instead of this one.",
      +  "type": "string"
      +}
    • addedInput schema / properties / toSprite
      Added value: +{
      +  "description": "For 'duplicate': copy the layer into another OPEN sprite instead of this one.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / duplicated
      Added value: +{
      +  "description": "Present when a 'duplicate' op in this call used `toSprite`.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "framesDropped": {
      +        "description": "Cels whose frame index exceeded the target's frame count.",
      +        "type": "integer"
      +      },
      +      "name": {
      +        "description": "Name it got in the target sprite; suffixed on a name clash.",
      +        "type": "string"
      +      },
      +      "sourceLayer": {
      +        "type": "string"
      +      },
      +      "toSprite": {
      +        "description": "Target as '#<id>' — stable even when several documents share a name.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "sourceLayer",
      +      "name",
      +      "toSprite",
      +      "framesDropped"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Changed10 schema fields changedv0.1.6
    • changedInput schema / properties / batch / description
      Previous value: -"Array of operation objects, each shaped like the single-op arguments. Applied in order."New value: +"Operations applied in order, in one undoable action. Same shape as the single-op arguments."
    • changedInput schema / properties / batch / items / additionalProperties
      Previous value: -{}New value: +false
    • addedInput schema / properties / batch / items / properties
      Added value: +{
      +  "blendMode": {
      +    "$ref": "#/properties/blendMode"
      +  },
      +  "editable": {
      +    "type": "boolean"
      +  },
      +  "index": {
      +    "description": "Target stack position; 0 is bottom.",
      +    "type": "integer"
      +  },
      +  "name": {
      +    "type": "string"
      +  },
      +  "names": {
      +    "description": "For 'merge' and bulk 'group'.",
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "newName": {
      +    "type": "string"
      +  },
      +  "op": {
      +    "$ref": "#/properties/op"
      +  },
      +  "opacity": {
      +    "maximum": 255,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "parent": {
      +    "description": "Group layer to nest under.",
      +    "type": "string"
      +  },
      +  "visible": {
      +    "type": "boolean"
      +  }
      +}
    • addedInput schema / properties / batch / items / required
      Added value: +[
      +  "op"
      +]
    • addedInput schema / properties / batch / maxItems
      Added value: +128
    • changedInput schema / properties / sprite / description
      Previous value: -"Sprite filename or id. Omit to use the sprite Aseprite has focused."New value: +"Which sprite: its id as '#7' (what every result reports back, and the only unambiguous form — two unsaved documents are both called 'Sprite'), its filename, or its display name. Omit to use the sprite Aseprite has focused."
    • addedOutput schema / properties / layers / items / properties / cels
      Added value: +{
      +  "description": "1-based frames that have a cel on this layer.",
      +  "items": {
      +    "type": "integer"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / layers / items / properties / editable
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / layers / items / properties / isTilemap
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / layers / items / required
      Previous value: -[
      -  "name",
      -  "index",
      -  "visible",
      -  "opacity",
      -  "blendMode",
      -  "isGroup"
      -]New value: +[
      +  "name",
      +  "index",
      +  "visible",
      +  "editable",
      +  "opacity",
      +  "blendMode",
      +  "isGroup",
      +  "isTilemap",
      +  "cels"
      +]
  3. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds real behavioral detail beyond that: batch is a single undoable action, and duplicate-to-another-sprite drops and reports frames past the target's frame count.

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 op list, then batch semantics, then the duplicate edge case, then a workflow tip. Efficient overall, though the final rigging-advice sentence is more ambient guidance than operational instruction.

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

Completeness3/5

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

Output schema exists so return values need no explanation, and annotations carry the destructive flag. However, with 13 parameters at 54% coverage, the description never says which parameters apply to which op (e.g. name vs newName, what 'set' can change), leaving ambiguity for a multi-mode tool.

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

Parameters3/5

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

Schema coverage is 54%, so the schema documents some parameters while leaving others bare (name, newName, opacity, visible, editable have no descriptions). The description clarifies batch grouping, toSprite target semantics, and that 'set' covers visibility/opacity/blend/lock, but does not map the remaining params to their ops.

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 the resource ('Manage layers') and enumerates all eleven operations, so an agent can see exactly what surface it covers. It clearly reads as the layer-level counterpart to siblings like cel and frame, though it never names a sibling to differentiate itself explicitly.

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 context: pass `batch` to run several ops in one undoable action and 'building a rig in one call is the normal use', plus the constraint that `duplicate`'s toSprite must be another OPEN sprite. No explicit when-not or named alternative tools, but the conditions that select the main modes are stated.

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