gdscript_references_in_file
Retrieve all references of a symbol in one .gd file as zero-based positions. Provides targeted reference lookup without parsing the entire project.
Instructions
Find occurrences of a symbol within ONE file. Returns: list of line/char positions. IMPORTANT: Uses ZERO-BASED coordinates. Much cheaper than gdscript_references, which reparses every .gd file in the project on Godot 4.6+. Requires Godot 4.7+; reports unsupported otherwise.
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>",
"line": "<line>",
"character": "<character>"
},
"name": "gdscript_references_in_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute or relative path to the .gd file | |
| line | Yes | Zero-based line number | |
| character | Yes | Zero-based character position |