get_symbol
Look up a symbol by its ID or fully qualified name and retrieve only its source code, signature, and metadata. Avoids reading entire files for a single function or class.
Instructions
Look up a symbol by symbol_id or FQN and return its source code. Use instead of Read when you need one specific function/class/method — returns only the symbol, not the whole file. For multiple symbols at once, prefer get_context_bundle. Read-only. Returns JSON: { symbol_id, name, kind, fqn, signature, file, line_start, line_end, source }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fqn | Yes | The fully qualified name to look up | |
| max_lines | No | Truncate source to this many lines (omit for full source) | |
| symbol_id | Yes | The symbol_id to look up | |
| verify_against_git | No | When true, compare the indexed source against the current git HEAD slice for that file and line range. If they differ, the response includes `git_mismatch: true` indicating the index may be stale. Read-only — never writes. Silently skipped when git is unavailable or the file is not tracked. |