Skip to main content
Glama

mame_exec_lua_live

Execute Lua code on a running MAME machine, accessing the machine object, and return the result for reverse engineering tasks.

Instructions

Run Lua on the live machine (vars M/machine = manager.machine); returns its value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose key behaviors: the code runs on the live machine, the variables M and machine are set to manager.machine, and the tool returns the Lua expression's value. However, it does not mention potential side effects, error handling, or whether the operation can modify emulator state, which is relevant for an 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 that directly states the action, context, and output. Every word contributes value; there is no fluff or redundancy. This is an ideal level of conciseness.

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?

This is a simple tool with one parameter and no output schema, so the description is mostly sufficient. It covers the main action and return value, but it lacks details on error behavior, side effects, and when to choose this over sibling Lua tools. Given the potential power of executing arbitrary code, a bit more context would improve completeness.

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 schema has one string parameter 'code' with no description (coverage 0%), so the description must compensate. It partially does by indicating that the code is Lua and runs in a specific environment (M/machine set to manager.machine). Yet it does not explicitly name the parameter or give examples or expected format, leaving room for ambiguity.

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 clearly states the tool's function with a specific verb ('Run Lua') and resource ('the live machine'), and provides useful context about the execution environment (M/machine = manager.machine) and return value. However, it does not differentiate from sibling tools like run_lua_script or run_lua_inline, so it misses full sibling differentiation.

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 gives no guidance on when to use this tool versus alternatives. It only states what it does, leaving the agent to guess whether it should use this or the other Lua execution tools in the sibling list. There are no explicit conditions, exclusions, or alternative references.

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