read_symbol
Retrieves exact source code for a function, class, or method by symbol ID so agents can inspect only the needed symbol's lines, signature, and docstring instead of the full file.
Instructions
Retrieves exact source code of a function, class, or method by symbol ID. Returns only that symbol's lines, signature, and docstring. ~50-200 tokens vs ~2000 for reading the full file.
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_id": "<symbol_id>"
},
"name": "read_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Filter to a specific repository (as shown in list_repos) | |
| verify | No | Verify content hasn't drifted since indexing | |
| symbol_id | Yes | Symbol identifier (from search_symbols or get_file_outline results) | |
| context_lines | No | Number of surrounding lines to include |