Run the unit tests
godot_testRun the project's GUT or GdUnit4 tests headless in Godot 4.7 and return only test totals, each failing test with its res://file:line and failure message. Use it after a change to confirm the tests still pass.
Instructions
Run the project's GUT or GdUnit4 tests in Godot 4.7 headless and return only the totals and the failing tests, each with res://file:line and the failure message, plus script errors from the run. Use it after a change to see whether the tests still pass. Needs Godot on this machine and GUT (res://addons/gut) or GdUnit4 (res://addons/gdUnit4) in the project. framework picks one when both are installed; dirs chooses the test folders or scripts (default: the framework's config, else res://test and res://tests); filter runs only matching GUT tests. An error result when a test fails, or when Godot or a framework is missing. Test files are not changed; reports go to a temporary folder or .godot/godotwright/. To try input without writing tests use godot_play; for load errors only use godot_check.
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_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dirs | No | test folders or scripts as res:// paths (default: the framework's config, else res://test and res://tests) | |
| path | No | project folder, or a file or folder inside it (relative to the server's folder; default: the current project) | |
| filter | No | GUT only: run only tests whose name contains this text | |
| framework | No | which framework (default: whichever is installed) | |
| timeout_seconds | No | timeout of the run (default 600) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| tests | Yes | ||
| errors | Yes | ||
| failed | Yes | ||
| passed | Yes | ||
| skipped | Yes | ||
| findings | Yes | ||
| warnings | Yes | ||
| framework | Yes | ||
| truncated | Yes |