Ask Godot's GDScript language server
godot_codeGet engine-exact GDScript diagnostics, type hovers, definitions, and completions from Godot's language server, including analysis of unsaved code.
Instructions
Engine-exact answers from Godot 4.7's own GDScript language server (kept warm for 10 minutes; the first call takes a few seconds). op diagnostics: errors and warnings at the project's warning levels, as res://x.gd:12:5: warning [UNUSED_VARIABLE] ..., for file or every script. op hover: the type or signature at line/column (1-based; a tab is one column). op definition: where the name there is declared, as res://file:line, or that it is an engine symbol. op completion: what can follow there (members after a dot, node paths after $), up to limit. Pass code to analyse unsaved text as file without writing it. Needs Godot. Like opening the editor, Godot imports the project: it updates .godot/ and adds a missing .import file next to each asset and a missing .uid file next to each script. A new class_name, a changed project.godot or a new asset restarts the server. Without Godot use godot_review; to load scenes too use godot_check.
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_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | diagnostics, hover, definition or completion | |
| code | No | unsaved GDScript to analyse as `file` instead of the file on disk; nothing is written | |
| file | No | the .gd file: res:// path or a path (diagnostics without it: every script) | |
| line | No | 1-based line (hover, definition, completion) | |
| path | No | project folder, or a file or folder inside it (relative to the server's folder; default: the current project) | |
| limit | No | completion: most items shown (default 40) | |
| column | No | 1-based column; a tab is one column (hover, definition, completion) |