Skip to main content
Glama

delete_layer

Deletes a specified layer or group from an Aseprite sprite, including all contents of a group, while refusing locked layers and preventing removal of the last remaining layer.

Instructions

Delete a layer; deleting a group deletes everything in it.

The sprite must keep at least one layer. A locked layer, a layer in a locked group and a group holding a locked layer are refused.

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>",
      "layer": "<layer>"
    },
    "name": "delete_layer"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.
layerYesLayer name, or a 'group/child' path for nested layers

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose the key traits: destructive cascade for groups, three classes of refused targets, and the minimum-one-layer invariant. It does not say whether deletion is undoable or what happens to cels/animations referencing the layer, which is the remaining gap for a destructive operation.

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?

Three short sentences, front-loaded with the destructive scope, then the invariant, then the refusal conditions. No filler and nothing repeated from the schema.

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

Completeness4/5

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

An output schema exists, so return values need not be described, and the description covers the destructive semantics and refusal rules an agent needs before calling. Only reversibility/undo behavior is left unstated for a mutation tool with no annotations.

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 adds real meaning to the 'layer' parameter by explaining that passing a group name deletes its entire contents, which the schema's 'group/child path' wording only hints at. It does not extend the 'path' parameter 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?

States a specific verb and resource ('Delete a layer') and immediately qualifies scope with the cascade rule for groups, which separates it from sibling deletions such as delete_frames, delete_slice, and delete_tag. An agent can tell what gets removed 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?

Gives concrete when-not conditions: the sprite must keep at least one layer, and locked layers, layers in locked groups, and groups containing locked layers are refused. It stops short of naming an alternative tool (e.g. delete_frames for frame removal), but the refusal rules make preconditions explicit.

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