get_definition
Find where a symbol is defined by passing its usage location. Returns the file path, line, and character of the definition.
Instructions
Get the definition location of a symbol. Returns the file path, line, and character where the symbol is defined. Tip: Use 'search_in_file' to find the exact line and character of the symbol you are interested in.
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": {
"filePath": "<filePath>",
"line": "<line>",
"character": "<character>"
},
"name": "get_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | The 0-based line number where the symbol is located | |
| filePath | Yes | The absolute path to the file containing the symbol usage (e.g. /path/to/project/src/index.ts) | |
| character | Yes | The 0-based character offset on the line where the symbol is located |