execute_lua
Run administrative Lua in a Factorio world to access advanced game or mod capabilities beyond standard tools, returning results through rcon.print(helpers.table_to_json(...)).
Instructions
Run explicit administrative Lua for advanced game/mod capabilities not covered above.
Use rcon.print(helpers.table_to_json(...)) to return data. Obtain the independent character through remote.call('factorio_llm_use','get_agent'). This has full game scripting power: use the specific tools for ordinary gameplay and respect the user's task scope.
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_lua"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |