Skip to main content
Glama

execute_luau

Run Luau code in Roblox Studio to automate tasks, inspect game state, or edit services. Captures prints and return values, with undo support.

Instructions

Execute arbitrary Luau code inside Roblox Studio (Command-Bar equivalent, with undo support). Return value / prints are captured. This unlocks EVERYTHING: Toolbox, tools, services, physics, etc. Multi-line allowed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesLuau code to run in Studio plugin context. `game`, `workspace`, services available. Use `return ...` to get data back.
timeoutMsNoWait timeout in ms (default 30000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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 reasonably well: it discloses undo support, that return values and prints are captured, that multi-line code is allowed, and that execution happens in the Studio plugin context. It stops short of stating what can be destroyed, permission/auth requirements, or error/rate-limit behavior for arbitrary code, which are meaningful omissions for a high-power 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.

Conciseness4/5

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

Three sentences, front-loaded with the core action, analogy, and output behavior. The 'unlocks EVERYTHING' clause is slightly promotional but does real routing work by signaling scope. No wasted sentences.

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 parameterized code-execution tool with no annotations and no output schema, the description covers the essentials: what runs, in what context, what comes back, and the undo affordance. It lacks safety/permission caveats and failure behavior, so it's strong but not exhaustive.

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 100% – both 'code' and 'timeoutMs' are documented in the schema, including the `return ...` convention and the default timeout. The description adds little parameter-level meaning beyond the schema, so the baseline 3 applies.

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 ('Execute arbitrary Luau code inside Roblox Studio') and grounds it with a recognizable analogy ('Command-Bar equivalent'). The line about unlocking Toolbox, tools, services, and physics positions it as the general-purpose escape hatch relative to the many granular siblings (create_instance, set_property, etc.), so an agent can distinguish it without opening another schema.

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

Usage Guidelines3/5

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

Implied usage is clear: this is the catch-all for anything the specialized tools don't cover. However, there is no explicit when-to-use vs. when-not (e.g., 'prefer the dedicated tools for simple edits; use this for multi-step or uncovered operations') and no prerequisites named. Guidance is inferred rather than stated.

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