run_luau
Execute Luau code in Roblox Studio's edit mode to capture return values and printed output with full plugin API access.
Instructions
Execute Luau in the Studio plugin context (EDIT mode — runs against the edit DataModel, not a running playtest's server/client). Captures the return value and printed output. Full plugin API access. For code that must run INSIDE a live play session, use Roblox's official Studio MCP (execute_luau); for code that must run against the PUBLISHED game on Roblox's servers, use cloud_luau instead.
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": "run_luau"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Luau source to run | |
| place | No | Target place (PlaceId or project name). Defaults to the bound/sole connected place. | |
| timeoutBudget | No | seconds before a yielding script is reported as stuck (default 30, max 85) |