execute_luau
Run Luau code in Roblox Studio to automate tasks, inspect game state, or edit services. Captures prints and return values, with undo support.
Instructions
Execute arbitrary Luau code inside Roblox Studio (Command-Bar equivalent, with undo support). Return value / prints are captured. This unlocks EVERYTHING: Toolbox, tools, services, physics, etc. Multi-line allowed.
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
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Luau code to run in Studio plugin context. `game`, `workspace`, services available. Use `return ...` to get data back. | |
| timeoutMs | No | Wait timeout in ms (default 30000) |