Get Optimal Context
get_optimal_contextBuild a prioritized reading list of related symbols before editing a function, ranked by importance and fitted to your token budget.
Instructions
Before working on a function, call this to get the most relevant related code ranked by importance and fitted to a token budget. Returns a prioritized reading list of symbols you should understand — better than guessing which files to open. Designed for iterative use: call it on your target, read the top results, then call it again on any surprising dependencies to build a complete picture.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Project name (required in multi-project mode). Use list_projects to see available projects. | |
| strategy | No | Traversal strategy: bfs (faster, local neighborhood) or blast_radius (full affected set) | |
| max_tokens | No | Token budget for the context window (default: 8000) | |
| target_entity | Yes | Entity ID or name to build context around |