Skip to main content
Glama

Ase Run Lua

ase_run_lua

Run custom Aseprite Lua scripts in batch mode to automate pixel-art editing tasks, with optional sprite loading and printed output capture.

Instructions

Execute arbitrary Aseprite Lua in batch mode - the escape hatch when no dedicated tool fits (full API: https://www.aseprite.org/api/). One script can batch many operations into a single Aseprite launch.

Essentials: when sprite_path is given it is opened first and bound to a local 'spr' (also app.activeSprite); changes are NOT saved automatically - call spr:saveAs(spr.filename) at the end; print() is the only way to return data (captured in the result's output list); do NOT end the script with a top-level return (it skips the completion marker and the call is reported as failed). Cel-image coordinates are cel-local: offset sprite-global coordinates by cel.position.

WARNING: executes unrestricted Lua (including io/os access) on the host running Aseprite. Only pass scripts you trust.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYes
sprite_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full disclosure burden and delivers thoroughly: it covers automatic sprite opening and 'spr' binding, unsaved changes requiring spr:saveAs, print() as the only return channel, the completion-marker failure caused by a top-level return, cel-local coordinate semantics, and an explicit security warning about unrestricted io/os access.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but well-organized: purpose first, then 'Essentials', then a prominent warning. Every sentence adds operational value; there is no filler or repetition of schema content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-complexity arbitrary-code tool, the description covers invocation, state binding, persistence, output capture, failure conditions, coordinate systems, and security. An output schema exists, so return-value details are handled there; the API link supplies deeper language reference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains sprite_path behavior in detail (opened first, bound to 'spr' and app.activeSprite) and clarifies script expectations via the print/return/save guidance. The script parameter itself is less specifically documented, but the surrounding instructions define its semantics well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Execute arbitrary Aseprite Lua in batch mode'. It also explicitly frames itself as 'the escape hatch when no dedicated tool fits', which distinguishes it from the many sibling ase_* tools in one phrase.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states when to use the tool: when no dedicated tool fits, and explains batch mode can consolidate many operations into one launch. It does not enumerate specific alternatives, but for an unconstrained script runner the condition is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools