merge_layers
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').
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "merge_layers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| save | No | Batch mode: write changes back to the sprite file (default true) | |
| layer | No | Layer name, 'Group/Child' path, or 1-based index from get_sprite_info. Defaults to the active layer. | |
| sprite | No | File path, open tab title, or sprite id. Defaults to the active sprite (live). Batch mode needs a file path. | |
| backend | No | auto (default): live Aseprite if connected, else headless batch |