get_symbol
Fetch a symbol's full source code and file context, including imports and related symbols, for detailed inspection.
Instructions
STEP 4 of token-efficient exploration — the only step that returns full source. Fetches ONE symbol (function/class/type) with file context (imports, siblings, warnings). Use ONLY after search_code/get_file_outline/get_file_folded identified the symbol. No API.
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": {
"file": "<file>",
"name": "<name>"
},
"name": "get_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Relative file path from project root (e.g., "src/tools/searchCode.ts") | |
| name | Yes | Symbol name to retrieve (e.g., "handleSearchCode", "SearchResult") | |
| context | No | Include file context: imports, exports, sibling symbols, warnings (default: true). Set to false for raw source only. |