Execute a Luau file in the Roblox Game Client
execute-fileExecute a local Lua or Luau script file in the active Roblox client, designed for running code that does not require returned values.
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 (0–8) to execute the code in (default: 8, normal game scripts run on 2) |