Read the errors of the game the user ran
godot_logsRead GDScript runtime errors and warnings from a Godot game's log file, with file:line and call chains, so agents can see what failed. Wait for the first error or fetch only new entries via a cursor.
Instructions
The errors and warnings of a game the user ran from the editor (F5/F6) or any other way, read from the log file the game writes itself (user://logs/godot.log), so they reach you whatever the editor's language and without the addon. user:// is found as Godot finds it (project name, custom user dir, the OS folder). Each entry: res://file:line, severity, message and the GDScript call chain (Godot 4.5+), with the lessons for the message. Before 4.5, Godot sends a GDScript runtime error of an editor run to the debugger only, not the log; the answer says so. Without since it reads the newest run (Godotwright's own Godot runs log to a temp file, never here); pass the since of the last answer to get only what is new: a new run of the game and Godot's log rotation are followed. godot_editor play returns a cursor for the run it starts. wait_seconds waits for the first error. When file logging is off it says so and names the setting to turn on. Read-only (it counts shown lessons in the local learning file).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "godot_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | project folder, or a file or folder inside it (relative to the server's folder; default: the current project) | |
| limit | No | errors and warnings to list (default 60) | |
| since | No | the cursor the last answer gave (next: since ...); leave it out for the newest run | |
| where | No | also show where user:// and the log are, and the settings that decide it | |
| user_dir | No | the folder user:// is, when the game runs as another user, in WSL, in a container or in a Flatpak (a Flathub editor's sandbox is found by itself on Linux) | |
| wait_seconds | No | wait up to this long for an error or warning (default 0: read once) |