gdscript_definition
Navigate to the definition of a symbol in a GDScript file using zero-based line and character positions. Returns the file path and line number of the symbol's definition.
Instructions
Navigate to the definition of a symbol at a given position. Returns: file path and line number where the symbol is defined. IMPORTANT: Uses ZERO-BASED coordinates (editor line 1 = pass line 0). Use when you need to find where a function, variable, or class is defined.
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_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute or relative path to the .gd file | |
| line | Yes | Zero-based line number (editor line - 1) | |
| character | Yes | Zero-based character position |