Skip to main content
Glama

execute_lua

Run server-side Lua code in Roblox Studio to inspect or modify the game, optionally bypassing safety checks with force or targeting a specific connected client.

Instructions

Execute arbitrary Lua code in Studio (server-side). Use force=true to bypass safety.

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_lua"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesLua code to execute on the server
forceNoBypass safety checks (default false)
clientNoTarget a specific Studio client by name (as shown on the panel, e.g. "studio"). Omit to auto-pick: the only active client, or the most recently active one when several are connected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that execution is arbitrary and server-side and that a safety mechanism exists which can be bypassed via force, which is meaningful behavioral context, but it does not say what the safety check blocks, whether execution is destructive or reversible, or how errors and output are reported.

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, front-loaded with purpose. Tight and functional, though the force guidance is tacked on rather than structured, and it omits any mention of what happens to the result.

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?

For an arbitrary-code-execution tool with no annotations and no output schema, the definition covers the basics but leaves gaps an agent would want: what the safety check guards against, whether effects persist, and what is returned (output vs. error). Adequate but not complete for this risk level.

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 description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by tying force to bypassing safety in context of the tool's purpose; the code and client parameters are fully documented in the schema and need no elaboration.

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 (Execute) and resource (arbitrary Lua code) plus execution environment (Studio, server-side), which clearly distinguishes it from siblings like check_script, read_script, or edit_script.

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?

The description gives one operational hint (use force=true to bypass safety), which implies a safety gate exists, but it never says when to prefer this tool over edit_script/write_script or when execution is inappropriate. Usage context is implied rather than stated.

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