context_pack
Retrieve a token-bounded block of relevant code and episodic context from a repository to inject into the next prompt, reducing token usage compared to reading raw files. Call before reading source files.
Instructions
Budget-pack the most relevant code + episodic context into a token-bounded block ready for injection into the next prompt. Call this BEFORE reading any source file to avoid wasting tokens on raw file reads. Returns at most max_tokens (default 2000) tokens — much smaller than raw files. Do NOT call for known short files (< 50 lines) — use Read directly instead.
file: optional relative path to scope retrieval to a single file. repo_path: optional absolute path to the target repository. When omitted, defaults to the server's configured project directory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| max_tokens | No | ||
| include_episodic | No | ||
| include_symbols | No | ||
| window_lines | No | ||
| file | No | ||
| repo_path | No |