execute_luau
Execute custom Luau scripts in Roblox Studio's Edit mode to modify DataModel, properties, and instances. The code can return values encoded as JSON.
Instructions
Run arbitrary Luau code in Roblox Studio (plugin security level, Edit-only). During Play use manage_studio.run_test / play agents instead — plugin loadstring is unavailable in Play. The code may return a value, which is JSON-encoded (Instances become path strings, Roblox types become typed tables). A helper table RB is available with RB.resolve(path or rbId), RB.encode(value), RB.summary(instance) (includes rbId), RB.setProp(instance, name, value), RB.stripIds().
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 source to run | |
| timeoutSeconds | No | Max wait (default 30) |