Skip to main content
Glama

Execute Luau

execute

Run Luau scripts in the Opiumware Roblox client and get back return values, print/warn output, and error tracebacks.

Instructions

Run Luau in the Roblox client (Opiumware, thread identity 8) and get back return values, print/warn output, and errors with traceback.

  • Just return values; tables, Instances, Vector3s etc. are serialized automatically. Don't JSONEncode.

  • Each run has its own global scope. Use getgenv() to keep state between runs. _G is the executor's; the game's is getrenv()._G.

  • Full executor API is available (getgc, hookmetamethod, decompile, firesignal, ...). To run a local file use the file parameter; the executor's own readfile/loadfile only see Opiumware's workspace folder.

  • Heavy scans (getgc, GetDescendants on large trees) must yield (task.wait() every few thousand items) or they freeze the game.

  • Long-running code (loops, listeners) should task.spawn and return right away. On timeout the run itself is cancelled, but threads it spawned keep running.

  • Errors returned here are NOT in the console. Errors/prints after the run returns (spawned/deferred code) only show in logs: use logs sinceExecute=true.

  • Separate execute calls made in parallel may run in any order.

  • Large results are saved to a temp file whose path is returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoLuau source to run. Provide either code or file.
fileNoPath to a local .lua/.luau file to run instead of code.
portNoOpiumware port of the Roblox instance (default: first found, see status).
timeoutNoSeconds to wait for the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/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 so: thread identity 8, per-run global scope, executor-vs-game _G distinction, requirement to yield on heavy scans, spawned threads surviving a timeout cancellation, and large results being written to a temp file. These are non-obvious runtime traits an agent could not infer elsewhere.

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 core action and return shape are front-loaded in the first sentence, followed by tightly scoped bullets. Every bullet carries operational information (scope, yielding, timeout side effects, ordering) with no filler.

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?

There is no output schema, but the description compensates by describing exactly what comes back (return values, serialized tables/Instances/Vector3s, print/warn, traceback, temp-file path for large results). Combined with the timeout and logging caveats, an agent has everything needed to call this 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 100%, so the baseline is 3, but the description adds genuine meaning: code vs file are framed as alternatives, and the timeout is explained behaviorally ('the run itself is cancelled, but threads it spawned keep running'), which the schema's plain 'Seconds to wait for the result' does not convey.

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 and resource ('Run Luau in the Roblox client') plus the exact return payload: return values, print/warn output, and errors with traceback. It also implicitly separates itself from the 'logs' sibling by noting that post-return output lands there instead.

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 concrete routing conditions: use the file parameter for local files, use logs sinceExecute=true for prints/errors emitted after the run returns, and note that parallel calls may interleave unpredictably. The getgenv()/_G/getrenv() state guidance tells the agent when state must be persisted rather than re-declared.

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