read_symbol
Fetch the source body of any function, method, or type by name, with support for dotted paths and fallback parsing. Returns all matches for ambiguous names.
Instructions
Read the source body of a named symbol (function, method, type) in one call. Accepts plain name or dotted ReceiverType.MethodName form. Returns all matches when the name is ambiguous. Each body line carries a display-only 1-based file line-number gutter ('\t', cat -n style) — strip it before reusing a line as an edit_file old_string. Falls back to a tree-sitter parse when the language server is cold or absent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | No | Alias for path (absolute path, file:// URI, or workspace-relative path). Used only when path is omitted. | |
| name | No | Exact symbol name. Accepts plain name (e.g. "handleConn") or dotted ReceiverType.MethodName form (e.g. "Model.renderDashboard"). | |
| path | No | Absolute path, file:// URI, or workspace-relative path of the file containing the symbol |