Skip to main content
Glama
okenjioxx

Roblox Executor MCP Server

by okenjioxx

Run Luau on the active client

run-luau
Destructive

Execute self-contained Luau in the active Roblox client and get the first returned value back. Use when your script needs no other MCP tools.

Instructions

Execute arbitrary Luau in the active Roblox client and return its first returned value (decoded from JSON). This is the core PURE-LUAU execution tool — no access to this server's other tools from inside the script. If you want to use any other tool's data (get-players, search-instances, discover-player-values, anything from list-tools) inside your Luau, STOP and use the script tool instead: it binds a live mcp table so you can write local p = mcp.getPlayers() / mcp.searchInstances({...}) / mcp.parallel({...}) and use the results directly — one call instead of dozens of round-trips. Use run-luau only when your Luau is fully self-contained (reading workspace, looping over a part, returning a value). return the value(s) you want back; do NOT call JSONEncode yourself, the connector serializes automatically. A chunk that returns nothing yields null. Use eval-expression for a single expression, or the higher-level inspection tools for structured reads. Signature: { source: string, threadContext: number?, timeoutMs: number?, client: string?, agent: string? }. Phase: act; cost=medium; idempotency=contextual-write. Requires: active-client, explicit-mutation-approval, validated-source. Produces: operation-receipt. Verify with: assert-state. Safety: MUTATING; executes caller-selected behavior in the live client. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentNoOptional. A stable label for WHICH agent is calling when several share this MCP session (e.g. 'researcher'). Gives that agent its own fair scheduling lane, its own persistent VM on each game, and its own queue budget, so co-tenant agents don't starve or clobber each other.
clientNoOptional. Run on a specific connected client — its clientId OR username — for THIS call only, overriding your session's select-client binding without changing it. Lets multiple agents drive different games at the same time; omit to use your session's selected client.
sourceYesLuau source to execute. Use `return <value>` to get data back.
timeoutMsNoPer-call deadline in milliseconds. Server default if omitted.
threadContextNoRoblox thread identity to run under (e.g. 2 = game scripts, 8 = elevated). Server default if omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0-spies.2

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructive/non-idempotent/non-readonly, but the description adds real behavior: no cross-tool binding inside the script, automatic JSON serialization ('do NOT call JSONEncode yourself'), null for a chunk that returns nothing, and prerequisites (active-client, explicit-mutation-approval, validated-source) plus a verification path (assert-state). That is materially more than the annotations carry.

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 action and the critical `script`-vs-`run-luau` routing decision, and the serialization caveat is placed well. The trailing metadata block (Phase/cost/idempotency/Requires/Produces/Verify/On-failure) is boilerplate-heavy and slightly dilutes an otherwise tight description.

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?

For a high-risk mutation tool with no output schema, the description covers prerequisites, return-value handling, failure recovery ('inspect tool-schema for exact fields'), and the verification step. An agent has everything needed to invoke it correctly without opening other artifacts.

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, and the per-parameter descriptions (agent scheduling lane, client override, threadContext identity) are already thorough. The description adds modest extra meaning by restating the signature and clarifying the `source` return contract, but it does not deepen the optional-parameter semantics beyond the schema.

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 in the active Roblox client') plus the exact return contract ('first returned value, decoded from JSON'). It actively distinguishes itself from siblings by naming `script` and `eval-expression` and the conditions that separate them.

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?

Explicit when-not guidance: 'no access to this server's other tools from inside the script' and a hard redirect to the `script` tool when other tools' data is needed, including the exact `mcp.getPlayers()` / `mcp.parallel({...})` pattern to use instead. It also routes single expressions to `eval-expression` and structured reads to higher-level inspection tools.

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