pack_context
Pack project context into a single document for external LLMs. Uses intelligent graph-based selection to fit within token budgets.
Instructions
Pack project context into a single document for external LLMs. Intelligent selection by graph importance, fits within token budget. Better than Repomix for focused context. Strategies: most_relevant (default — feature/PageRank ranked), core_first (PageRank always wins, surfaces architecturally central code), compact (signatures only — drops source bodies, lets outlines cover much more of the repo per token). Read-only. Use when sharing project context with external tools. Returns XML/Markdown/JSON with selected code within budget.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | Scope: project (whole repo), module (subdirectory), feature (NL query) | |
| path | Yes | Subdirectory path (for module scope) | |
| query | Yes | Natural language query (for feature scope) | |
| format | No | Output format (default: markdown) | |
| max_tokens | No | Token budget (default: 50000) | |
| include | No | Sections to include (default: outlines + source + routes) | |
| compress | No | Strip function bodies, keep signatures (default: true) | |
| strategy | No | Packing strategy (default: most_relevant). core_first = PageRank always wins. compact = drops source bodies, allows much wider outline coverage. | |
| include_budget_report | No | Include per-section token breakdown + headroom in result (default false) |