Skip to main content
Glama

run_lua_script

Run MAME Lua autoboot scripts headlessly to automate reverse engineering tasks such as memory tracing, input injection, and ROM auditing.

Instructions

Run a caller-supplied MAME Lua autoboot script headlessly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoMAME working directory. Defaults to MAME_CWD or current directory.
framesNoFrame budget used to calculate safety seconds.
systemNoMAME machine short name. Defaults to MAME_SYSTEM.
mameExeNoMAME executable. Defaults to MAME_EXE or `mame`.
rompathNoROM search path. Defaults to MAME_ROMPATH.
workdirNoGenerated-script/log directory. Defaults to MAME_WORKDIR or <cwd>/.mame_mcp.
scriptPathYesLua script path.
timeoutSecNoProcess timeout in seconds.
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure, but it only states the basic action. It omits side effects (e.g., whether a MAME process is spawned or modified), safety profile, or any state changes, which is critical for a script execution tool.

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 a single, front-loaded sentence with no filler or redundancy. Every word contributes to the core message, making it highly concise and well-structured.

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

Completeness2/5

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

Despite the tool's complexity (8 params, no annotations, no output schema), the description is too minimal. It fails to convey return behavior, failure modes, or how it interacts with existing MAME sessions, leaving significant gaps for an agent to operate safely.

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?

The input schema provides descriptions for all 8 parameters (100% coverage), so the baseline is 3. The tool description adds no additional parameter meaning, but the schema already covers the semantics adequately.

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 clearly states the action ('Run'), the resource ('caller-supplied MAME Lua autoboot script'), and the mode ('headlessly'). This distinguishes it from sibling tools like mame_exec_lua_live (live execution) and run_lua_inline (inline script), making the purpose unambiguous.

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?

There is no guidance on when to use this tool versus alternatives such as run_lua_inline or mame_exec_lua_live. It does not mention prerequisites, expected context (e.g., existing MAME session), or exclusions, leaving the agent to infer usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/astrobleem/mame-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server