Skip to main content
Glama
Aseprite Studio MCP

Aseprite Studio MCP

by Irmiyaa

run_lua

Execute custom Aseprite Lua code against a sprite in a safe, undoable transaction to automate edits, inspect artwork, and return JSON data or inline previews.

Instructions

Execute custom Aseprite Lua code against a sprite inside a staged snapshot or live app.transaction (safe & undoable). Globals sprite, ops, and args are available; return any JSON-serializable value.

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>",
      "code": "<code>"
    },
    "name": "run_lua"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesLua code to run against `sprite`.
fileYes
labelNoJournal label for this script.
paramsNoOptional table exposed as `args` in Lua.
previewNoReturn an inline PNG preview in the same Aseprite call (true or options object).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden. It usefully discloses that execution is safe and undoable via app.transaction and names the injected globals, but it does not explain sandboxing limits, execution failure behavior, or how staged-snapshot execution differs from live mutation in terms of persistence.

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 definition is two tight sentences with no wasted wording. Execution context and the key global/return contract are front-loaded.

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

Completeness3/5

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

For a complex arbitrary-code-execution tool with nested preview options and no output schema, the description covers the basics but omits important operational context such as error handling, sandbox boundaries, and when live mutation persists. It is adequate but not fully complete.

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

Parameters3/5

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

Schema description coverage is 80%, so the schema already documents most parameters. The description adds some meaning by mapping params to the args global and mentioning sprite/ops availability, but it does not clarify file, label, or preview behavior beyond what the schema already states.

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

Purpose4/5

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

The description uses a specific verb and resource: 'Execute custom Aseprite Lua code against a sprite.' It also clarifies the execution context (staged snapshot or live app.transaction) and available globals, making the tool distinguishable from dedicated drawing and editing siblings. It lacks an explicit sibling comparison, which keeps it short of a 5.

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

Usage Guidelines2/5

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

The description implies this is an escape hatch for custom scripting, but it does not state when to use run_lua instead of dedicated tools such as batch_ops, draw_pixels, or apply_effect. It gives no exclusions, prerequisites, or decision criteria for choosing this tool over safer task-specific alternatives.

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