polish_sprite
Runs a one-shot cleanup pass on sprites: merges near-duplicate colors, removes line doubles and stray pixels, then re-scores. Use it to polish artwork safely, since checkpoints allow undo.
Instructions
One-shot cleanup pass: checkpoint, merge near-duplicate colours, remove doubles from lines, remove stray pixels, then re-score.
Safe to run often; restore_checkpoint undoes it. Returns the critique score before and after and what each step changed.
Args: filename: Aseprite file layer_name: "*" = all image layers (default), or one layer frames: "" = every frame protect: Deliberate single pixels to keep, "x,y;x,y" merge_threshold: OKLab distance for merging colours (0.035 = the critique's near-duplicate limit) clean_lines, clean_strays, merge_colors: Steps to run checkpoint: Save a checkpoint first
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": {
"filename": "<filename>"
},
"name": "polish_sprite"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frames | No | ||
| protect | No | ||
| filename | Yes | ||
| checkpoint | No | ||
| layer_name | No | * | |
| clean_lines | No | ||
| clean_strays | No | ||
| merge_colors | No | ||
| merge_threshold | No |