Get data by code
get-data-by-codeExecute Luau code in the active Roblox client to retrieve raw Lua values. The code must return values; serialization is handled automatically.
Instructions
Execute Luau in the active Roblox client and return serialized raw Lua values. The code must return values; do not manually JSON-encode them.
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": "get-data-by-code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code to execute in the Roblox Game Client (MUST return one or more values). Return raw Lua values - do NOT manually serialize tables or use JSONEncode, the connector handles serialization automatically. | |
| timeout | No | Timeout in milliseconds for the response (default: 15000, max: 120000). Increase for long-running operations like decompiling many modules. | |
| threadContext | No | The thread identity to execute the code in (default: 8, normal game scripts run on 2) |