Skip to main content
Glama

femm_run_lua

Execute legacy FEMM 4.2 Lua scripts unchanged using FEMM 5's bundled Lua 4 interpreter. Spawns a standalone engine and returns stdout, stderr, and exit code.

Instructions

Run a legacy FEMM 4.2 Lua script unchanged with FEMM 5's bundled Lua 4 interpreter (bin/femm-lua.bat on Windows: femm-lua -h -p <free port> script.lua args). It spawns its own engine (not a session) and exits when done. VERIFIED on Windows with a small newdocument/mi_probdef/mi_addnode/print script. Returns stdout/stderr/exit code. To port a Lua script permanently, rewrite it with femm_run_script (MicroPython) instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo
pathYes
timeoutNo
headlessNo

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?

With no annotations, the description carries the full burden and does well: it discloses that the tool spawns its own engine rather than attaching to a session, exits when finished, has been verified on Windows with a concrete script, and returns stdout/stderr/exit code. It does not explain timeout expiry behavior, what headless=false does, or failure modes, which keeps it just short of full marks.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then the invocation form, behavioral note, verification evidence, and the alternative — a logical order with no filler sentences. The parenthetical Windows command and the verification claim are dense but each earns its place; only the verification sentence is close to optional.

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

Completeness4/5

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

For a subprocess-execution tool with no annotations and no output schema, the description supplies the return shape (stdout/stderr/exit code), the engine-spawning semantics, and the alternative tool. Remaining gaps are the undocumented timeout/headless parameters and what happens on timeout, which a caller arguably needs.

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 0%, so the description must compensate for all four parameters. It implicitly covers path (script.lua) and args (trailing arguments on the command line) but says nothing about timeout (default 600) or headless (default true), leaving half the parameters documented only by their bare schema titles.

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?

States a specific verb+resource (run a legacy FEMM 4.2 Lua script unchanged on FEMM 5's bundled Lua 4 interpreter) and even shows the exact invocation form. It explicitly distinguishes itself from the sibling femm_run_script, so an agent can route correctly without opening either schema.

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

Usage Guidelines5/5

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

Gives the when (a legacy 4.2 Lua script that must run unmodified) and the when-not with a named alternative: 'To port a Lua script permanently, rewrite it with femm_run_script (MicroPython) instead.' It also clarifies this is not a session-based call, which routes the agent away from the femm_session_* siblings.

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

Deploy Server

Other Tools