resolve_context_bundle
Builds a token-pruned Markdown context bundle from a target file's dependency graph, with optional breaker-state degradation and session budget tracking for multi-module edits.
Instructions
Calculate topological dependency graph distances (D0 full target_file, D1 interface stubs, D2 nominal symbols) within project_root (defaults to target_file's parent directory) and compile a token-pruned Markdown context bundle, with optional reactive degradation via breaker_state ('CLOSED', 'TRIPPED' strips D2+ modules, or 'HALTED' compacts D1 to nominal stubs) and session_id ('SES-...' linked to TokenCast budget tracking). Use this as your primary context builder before editing a file in a multi-module project; for inspecting isolated files, use prune_file instead.
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": {
"target_file": "<target_file>"
},
"name": "resolve_context_bundle"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | Session identifier (SES-...) to connect with TokenCast budget tracking | |
| target_file | Yes | Path to the active target file in editing (D0) | |
| project_root | No | Root directory of the project. Defaults to target file's directory. | |
| breaker_state | No | Optional circuit breaker state (CLOSED, TRIPPED, HALTED) or decision kind |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Compiled topological Markdown prompt context bundle | |
| isError | Yes | True if dependency resolution or file traversal failed |