Skip to main content
Glama

run_lua

Destructive

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

NameRequiredDescriptionDefault
codeYes
paramsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, readOnlyHint=false and non-idempotent, so the safety profile is covered. The description adds genuinely new context: the environment-variable gate that can make the call unavailable, and the shape of the return value ({"result": value}). It does not discuss execution limits, timeouts, or how errors surface, which keeps it below a 5.

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?

Three short sentences plus a reference link; the capability is front-loaded, the gating constraint second, and the input/output contract last. Nothing is redundant.

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 two-parameter arbitrary-code tool with no output schema, the definition covers the essential unknowns: how code is invoked, how values come back, and that the tool may be disabled entirely. Combined with annotations that declare it destructive, an agent has enough to decide and invoke correctly.

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 coverage is 0%, so the description must carry the burden, and it does explain the key semantic: `code` is the body of `function(params)` and its return is JSON-serialized into {"result": value}. The `params` argument itself is only implied (what gets bound to the function argument) with no detail on serialization constraints, so it falls short of full coverage.

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?

"Run arbitrary Aseprite Lua" gives a concrete verb and resource, and the word "arbitrary" plus the scripting-API link makes it immediately distinguishable from the granular siblings (draw, add_layer, export_spritesheet) that do one specific operation each.

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

Usage Guidelines3/5

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

The description states a hard prerequisite (disabled unless ASEPRITE_MCP_ALLOW_LUA=1) and implies this is the escape hatch for anything the structured tools cannot do, but it never explicitly says "use this instead of X when Y", nor does it warn when NOT to use it beyond the environment gate.

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