Start or stop a game session that stays up
godot_sessionLoad a Godot 4.7 scene once and keep it running paused at frame 0 so a live game can be inspected and stepped frame by frame without reloading the world.
Instructions
Load a scene in Godot 4.7 headless once and keep it running between calls, paused at frame 0, so godot_game can look at the live game and move it frame by frame without loading the world again (a big world can take a minute to load; godot_play loads it on every call). op start (scene: default the main scene; restart: true loads it again), status, or stop. Only this machine can reach it (a loopback port with a token), the project is not changed (the script lives in .godot/godotwright/), and the game quits by itself after idle_minutes without a request (default 15). Stop it when you are done.
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": {
"op": "<op>"
},
"name": "godot_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | start, status or stop | |
| path | No | project folder, or a file or folder inside it (relative to the server's folder; default: the current project) | |
| scene | No | the res:// scene to load (default: the main scene) | |
| restart | No | stop a running session and load the scene again | |
| idle_minutes | No | quit after this many minutes without a request (default 15) | |
| timeout_seconds | No | how long the scene may take to load (default 300) |