get_definition
Find the exact file path and line number where a symbol is defined. Use it to jump to the implementation of a function or class directly from your code position.
Instructions
Returns the SOURCE LOCATION (file path + line number) of where a symbol is defined. PREFER a name (uri + symbol_name) — plumb resolves the exact identifier position for you, avoiding off-by-one errors; a raw file position (uri + line + character) is the fallback and, when it lands off an identifier, is snapped to the enclosing symbol. Use when you need to navigate to the implementation of a symbol. For documentation or type signatures at the same position, use explain_symbol instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | No | Absolute path, file:// URI, or workspace-relative path of the document | |
| line | No | Zero-based line number. Required when symbol_name is not provided. | |
| character | No | Zero-based character offset. Required when symbol_name is not provided. | |
| symbol_name | No | Symbol name to look up instead of a position — PREFERRED over line/character. Accepts plain name or ReceiverType.MethodName form. plumb resolves it against the file's symbols, avoiding the off-by-one and 'no identifier found' errors of a hand-computed position. When provided, line and character are not needed. |