Skip to main content
Glama

merge_layers

Destructive

Combine layers by merging one into the layer below, flattening all layers, or flattening only visible layers to simplify sprite structure before export.

Instructions

Merges a layer into the one below (mode='down'), flattens all layers ('flatten'), or flattens only visible layers ('visible').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo
saveNoBatch mode: write changes back to the sprite file (default true)
layerNoLayer name, 'Group/Child' path, or 1-based index from get_sprite_info. Defaults to the active layer.
spriteNoFile path, open tab title, or sprite id. Defaults to the active sprite (live). Batch mode needs a file path.
backendNoauto (default): live Aseprite if connected, else headless batch

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuine context by specifying what destruction occurs — a layer is collapsed into the one below, or all/visible layers are flattened — which tells the agent the layer structure is lost. It stops short of mentioning undo-ability or irreversible side effects.

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?

A single front-loaded sentence with three parallel clauses, no filler, and the core verb stated first. Every clause earns its place by defining a mode.

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?

No output schema exists, but the description need not explain return values for a mutation. Combined with 80% schema coverage and destructive annotations, the definition gives enough to invoke correctly; only undo/reversibility context is absent.

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 80%, so most parameters are documented structurally, but the 'mode' enum is listed bare in the schema with no value descriptions. The description supplies the missing semantics for all three enum values, adding real meaning beyond the schema.

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?

The description states a specific verb (merges/flattens) and resource (layers), and enumerates the three mode behaviors, so an agent knows exactly what each invocation does. It does not explicitly differentiate itself from layer-manipulation siblings such as convert_layer or delete_layer, which keeps it short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The three modes are described, which implies the conditions for each, but there is no explicit when-to-use/when-not guidance and no named alternative (e.g. when to flatten vs. use convert_layer). Usage is inferable rather than stated.

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