get_symbol
Fetch a single function, class, or method by symbol ID or FQN and return only its source code. Avoids reading the whole file; can verify indexed source against git HEAD to detect stale data.
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 | Compare the indexed source against the current git HEAD slice; mismatches set `git_mismatch: true` in the response (index may be stale). Read-only. Silently skipped when git is unavailable or the file is untracked. |