read_symbol
Get symbol body and version directly by symbol_id or name+file. Automatically re-indexes changed files for current results.
Instructions
MUST READ BEFORE WRITE. Symbol body + version (base_version for writes). Resolves by symbol_id or name+file. Full file? read_outline. AUTO-FRESH: files modified after last index are re-indexed automatically on read — explicit reindex only needed for brand-new workspaces/files.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | core (default): body+version. rich: +outline+navigation. | |
| source | No | live (default): current file+staleness. indexed: read-only snapshot, never for write. | |
| locator | No | ||
| locators | No | Y002-S5 batch entry: array of locators, parallel read-only, per-entry failure non-blocking. Use instead of locator for multi-symbol reads. | |
| budget_hint | No | Max body chars to return; must truncate, not hint (default 1200) | |
| on_ambiguous | No | fail (default): return candidates, never silently pick. | |
| context_lines | No | Context lines around symbol (default 0 — context_lines does not affect slicing; symbol body is returned as indexed) | |
| outline_depth | No | Outline depth (default 1) | |
| workspace_dir | Yes | REQUIRED: project root (abs). reindex first if new. | |
| include_outline | No | Force include file outline (off in core by default) |