read_symbol
Retrieve the source code of a single declaration (function, class, etc.) from a file, avoiding full file reads. Works with symbol name, optional line disambiguation, and can return only the signature.
Instructions
USE INSTEAD OF Read on a file when you only need ONE function/class — returns just that named declaration's source (its span), not the whole file (the read twin of replace_symbol_body). signatureOnly = head only; body capped by VTS_SYMBOL_MAX_LINES.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | No | 0-based line; disambiguate same-named (optional). | |
| path | No | File holding the symbol (else resolved via the index). | |
| symbol | Yes | Declaration name to read. | |
| backend | No | ||
| projectPath | No | ||
| signatureOnly | No | Return just the declaration head. |