gdscript_sync_file
Notify Godot's LSP that a GDScript file was modified and retrieve updated diagnostics. Optionally provide file content to avoid disk read.
Instructions
Notify Godot's LSP that a file was modified and get updated diagnostics. Returns: diagnostics (errors/warnings) for the synced file. WHEN TO CALL: After using Edit/Write tools to modify a .gd file. The LSP does not watch files, so you must call this to refresh analysis. Optionally pass content directly to avoid reading from disk.
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": {
"file": "<file>"
},
"name": "gdscript_sync_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute or relative path to the modified .gd file | |
| content | No | File content to sync (optional, reads from disk if not provided) |