Skip to main content
Glama

execute_luau

Execute Luau code inside Roblox Studio to author and test game behavior; safe mode guards execution unless the server runs unsafe.

Instructions

Execute Luau code inside Roblox Studio. Guarded by luau_safe_mode unless server started with --unsafe.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>"
    },
    "name": "execute_luau"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden, and it does add real value by naming the luau_safe_mode guard and the --unsafe server flag that overrides it. However, it says nothing about side effects, whether arbitrary code can mutate the place, error behavior, or execution limits, which matters greatly for an arbitrary-code-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?

Two short sentences with the core action front-loaded and no filler. The safety caveat is slightly terse and could be clearer about what luau_safe_mode actually restricts, but nothing is wasted.

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?

An output schema exists, so return values need not be explained, and the single required parameter is simple. Still, for an arbitrary code execution tool with zero annotations, the definition omits error semantics, sandbox boundaries, and what safe mode actually blocks, leaving meaningful gaps.

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%, but there is only one parameter, 'code', whose meaning is largely self-evident from its name. The description does not state whether it accepts a full script, a single expression, or how results are surfaced, so it fails to fully compensate for the missing schema documentation.

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 states a specific verb and resource: 'Execute Luau code inside Roblox Studio.' That is unambiguous and distinguishable from siblings like read_script or write_script, which manipulate script text rather than run code. It does not explicitly contrast itself with those siblings, keeping it short of a 5.

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?

There is no guidance on when to choose this tool over write_script or read_script, nor any stated preconditions for use. The only contextual note is the safe-mode caveat, which describes a constraint on execution rather than when to invoke the tool.

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