get_symbol
Retrieve the source code of a specific symbol (function, class, or method) by its symbol ID or fully qualified name, returning only the relevant code fragment.
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 |
|---|---|---|---|
| symbol_id | Yes | The symbol_id to look up | |
| fqn | Yes | The fully qualified name to look up | |
| max_lines | No | Truncate source to this many lines (omit for full source) |