Surgical symbol snippet(s)
get_symbol_contextRetrieve the body of a function, class, or method with surrounding context lines, from one or multiple symbol names or a path+line, avoiding whole-file reads to save tokens.
Instructions
Return ONLY the body of a symbol (function/class/method) plus a few context lines — not the whole file. Give a name (resolved via the index), several names at once, or an explicit path+line. This is the biggest per-lookup token saver. When a skeleton showed you WHERE the functions are, pull their bodies with names:[...] here — do NOT fall back to reading the whole file for a handful of bodies.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | No | Definition line (use with path). | |
| name | No | Symbol name to resolve via the index. | |
| path | No | File path (use with line instead of name). | |
| after | No | ||
| names | No | Several symbol names in one call — one bounded body each. The narrow alternative to a whole-file read. | |
| before | No | ||
| maxLines | No | Cap each returned span (default 200); tail elided with a notice. | |
| pathPrefix | No | Restrict name resolution to files under this prefix — disambiguates a duplicated name in ONE call. |