plan_adaptive_retrieval
Plans adaptive code retrieval by choosing whole-file, symbol, dependency, or caller context and ranking candidates within a token budget for a given task.
Instructions
Task-Aware Adaptive Retrieval Engine: Dynamically selects whole-file (for small files <120 lines), targeted symbols, symbols + dependencies, or symbols + callers, with candidate ranking justifications, token budget limits, and uncertainty classification (Resolved vs Potential vs Unknown).
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": {
"task": "<task>"
},
"name": "plan_adaptive_retrieval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | Task description or target symbols/files (e.g. 'Extract SleepInhibitor and handle tunnel in cli.py') | |
| root_dir | No | Path to the repository root directory (default: '.') | . |
| token_budget | No | Maximum token budget for returned context (default: 3000) | |
| target_symbols | No | Optional list of exact symbol names to focus on | |
| strategy_override | No | Optional strategy override (default: 'auto') | auto |