Skip to main content
Glama
EL4CTEO

Roblox Studio MCP

Run Luau in Studio

execute_luau
Destructive

Run custom Luau scripts in Roblox Studio to read data, perform calculations, or call engine APIs that dedicated tools don't cover, and retrieve printed or returned output.

Instructions

Runs Luau in Studio's plugin context and returns whatever it printed, returned, or threw.

This is the escape hatch. Reach for it only when no dedicated tool fits — create, modify, delete, move, script_edit and find validate their input, type values from the live API dump, and wrap writes in an undo recording. Code run here does none of that, so a typo becomes a runtime error instead of a suggestion, and changes it makes may not be undoable as one step.

Good uses: reading something no tool exposes, a one-off calculation over many instances, or calling an engine API the tools do not cover.

Output printed while it runs is captured and returned, so print is a reasonable way to get values out. return works too, including returning a table — it comes back as a structure, not a summary. There is no timeout: an infinite loop will hang Studio until it is force-quit.

Against a running playtest server, Studio disables loadstring, so the code is compiled through a ModuleScript instead and runs at script identity — plugin-only APIs are unavailable there. When that happens it is stated in the result rather than left to be inferred from a failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesLuau to run. In an editor session this has plugin permissions, so `game`, `workspace` and plugin-only APIs are all reachable.
studioIdNoTarget Studio; omit for the active one.
Behavior5/5

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

Beyond the annotations (destructiveHint=true, readOnlyHint=false), the description discloses crucial behaviors: no input validation, no undo recording, no timeout (infinite loop hangs Studio), the print/return capture mechanism, and the playtest-specific loadstring limitation. It elaborates on edge cases and failure modes that the annotations only hint at, giving the agent a full behavioral picture.

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?

The description is lengthy but every paragraph serves a distinct purpose: purpose, when to use, output behavior, and edge cases. It is front-loaded with the primary action and then builds context. While compactness is slightly sacrificed, the density of critical operational details warrants the length for a tool with this power. It is efficiently structured and not repetitive.

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?

Given the tool's complexity, absence of an output schema, and the fact that annotations only cover destructive/read-only hints, the description covers all agent-relevant aspects: return semantics (print/return/throw, table as structure), the undo caveat, the timeout risk, and the playtest mode difference. No critical behavioral aspect is left to inference, making it complete for safe and correct invocation.

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?

The schema already describes both parameters fully (source and studioId), and the description adds extra context: the source param is granted plugin permissions and can access game/workspace/plugin APIs, and the studioId param defaults to the active Studio. For the playtest scenario, it explains the compilation alternative, adding meaning beyond the schema. Since schema coverage is 100%, the baseline is 3, but the description enriches the parameters with runtime details, justifying a 4.

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?

The description states a specific action ('Runs Luau') and the exact context ('Studio's plugin context') and outcome ('returns whatever it printed, returned, or threw'). It also names the sibling tools it is not (create, modify, delete, move, script_edit, find) to explicitly distinguish itself as the escape hatch. This fully clarifies what the tool does and how it differs from alternatives.

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?

The description gives explicit when-to-use and when-not-to-use guidance: 'Reach for it only when no dedicated tool fits' and lists the dedicated tools that validate and wrap writes. It then provides concrete good uses (reading unexposed data, one-off calculations, calling uncovered APIs) and highlights the consequences of using it (typos become runtime errors, changes may not be undoable). This is model usage guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EL4CTEO/rbx-studio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server