read_symbol
Extract a single function or class declaration from a file by name, returning only its source span instead of the entire file. Use signatureOnly to get just the declaration head, reducing token usage.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"symbol": "<symbol>"
},
"name": "read_symbol"
}
}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. |