run_lua
Executes custom Aseprite Lua code to automate sprite, animation, palette, and tileset tasks, returning JSON-serializable results.
Instructions
Run arbitrary Aseprite Lua. Disabled unless ASEPRITE_MCP_ALLOW_LUA=1.
code is the body of function(params) and may return a JSON-serializable value,
which is returned as {"result": value}. The full Aseprite scripting API is available:
https://aseprite.org/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": {
"code": "<code>"
},
"name": "run_lua"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| params | No |