execute_aseprite_script
Run a complete Aseprite Lua script headlessly to draw, animate, or export a sprite in one batch call, verifying the resulting output file.
Instructions
Run a complete Aseprite Lua script headlessly (aseprite --batch --script). Write the whole drawing/animation/export as one script instead of many small calls. Call get_aseprite_lua_docs first if unsure about the API.
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": {
"lua_code": "<lua_code>"
},
"name": "execute_aseprite_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lua_code | Yes | Full Lua script to execute | |
| output_filename | No | Expected output file (e.g. sprite.png). Absolute paths are used as-is; relative paths resolve against DEFAULT_OUTPUT_DIR (or the server's working directory). Missing directories are created. The script itself must save it (e.g. spr:saveCopyAs(...)); this is used to verify the result. |