Skip to main content
Glama

run_lua_inline

Run MAME Lua source strings directly in a headless environment, then collect results via an artifact file the script writes.

Instructions

Run caller-supplied MAME Lua source (string, not a path) headlessly; optionally read back an artifact file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoMAME working directory. Defaults to MAME_CWD or current directory.
luaYesLua source to run as an autoboot script.
framesNoFrame budget for 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.
timeoutSecNoProcess timeout in seconds.
artifactPathNoOptional file the script writes; its text is returned.
Behavior3/5

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

The description discloses that execution is headless and that an artifact file can be read back, which is useful. However, it does not mention process timeouts, frame budget safety, or potential side effects on the working directory. With no annotations, this leaves some behavioral ambiguity.

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, well-structured sentence that front-loads the primary action and includes the key distinction (string vs path). Every word earns its place, with zero redundancy.

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?

Given the tool has 9 parameters and no output schema, the description provides only minimal context about what happens after execution. It clarifies the core task and optional artifact read-back, but leaves many behavioral and environmental aspects (e.g., defaults, return values when no artifactPath is set) to the schema, which may not be enough for a complex tool.

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 coverage is 100%, so the baseline is 3. The description adds a useful clarification that the lua parameter is a string, not a path, and ties artifactPath to reading back an artifact file. This slightly enhances the schema but is not substantial.

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 tool runs caller-supplied MAME Lua source as a string headlessly, distinguishing it from path-based script tools like run_lua_script. The verb 'Run' is specific and the resource is well-defined.

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 phrase 'string, not a path' implicitly tells the agent when to use this tool (inline Lua) versus run_lua_script (file path). 'Headlessly' also suggests use when no interactive session is needed. However, no explicit alternatives or when-not-to-use scenarios are given.

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