Execute a Luau file in the Roblox Game Client
execute-fileExecutes a local .luau or .lua file in the active Roblox game client. Choose this tool when you need to run code without returning output.
Instructions
Execute a local .luau or .lua file in the active Roblox client without returning output. Use get-data-by-code instead when you need returned values.
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": {
"filePath": "<filePath>"
},
"name": "execute-file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | The absolute path to the .luau or .lua file to execute | |
| threadContext | No | The thread identity to execute the code in (default: 8, normal game scripts run on 2) |