edit_region
Move, copy, or erase rectangular pixel regions, or remove all pixels matching a chosen color, across Aseprite layers and frames.
Instructions
Move, copy, or erase rectangular pixel regions, or erase all pixels matching a color.
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": {
"file": "<file>",
"action": "<action>"
},
"name": "edit_region"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| dx | No | Relative X delta (for move/copy). | |
| dy | No | Relative Y delta (for move/copy). | |
| toX | No | Absolute destination X (for move/copy). | |
| toY | No | Absolute destination Y (for move/copy). | |
| file | Yes | ||
| color | No | For erase_color: color to erase. | |
| frame | No | ||
| layer | No | Target layer ('*' allowed for erase_color). | |
| width | No | ||
| action | Yes | ||
| height | No | ||
| preview | No | Return an inline PNG preview in the same Aseprite call (true or options object). | |
| toFrame | No | Destination frame(s) (for copy). | |
| toLayer | No | Destination layer (for copy). | |
| fromFrame | No | Source frame (for copy). | |
| fromLayer | No | Source layer (for copy). | |
| overwrite | No | For copy: also overwrite destination with transparent pixels. | |
| tolerance | No | For erase_color: channel tolerance. |