Eval Lua in the running game
game_evalExecute Lua chunks in the running game's debugger to test mod behavior and get immediate results from the game state.
Instructions
Execute a Lua chunk inside the running game's VM through the debugger and return its result. Use 'return ' to get values back. Full game API available (Map, Game, data, UI...). The VM answers only while executing Lua (in menu or paused game it can time out). Simulation writes from here can desync multiplayer — fine in single player.
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": {
"chunk": "<chunk>"
},
"name": "game_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chunk | Yes | Lua code, e.g. 'return Map.GetTick()' or 'return data.frames.f_bot_1s_a.name' | |
| timeout_ms | No |