The standard failure is asking for a repository, getting most of a context window back, and discovering afterwards that a lockfile and a vendored dependency accounted for most of it. Reporting the token count first, and then which files are responsible, turns that into a decision made in advance. Pagination on the retrieval is the matching piece — a merged codebase that exceeds the response limit is not partially useful, it fails. Three tools, no writes, and the discipline is the product rather than the packaging.
A three-tool codebase packaging server built around token cost: measure it first, find the largest contributors, then retrieve the merged content in pages.
- get_codebase_size returns token counts before any processing, which is the number that decides whether the next call is affordable.
- get_codebase_top_largest_files identifies which files are driving the size, so exclusions can be chosen rather than guessed.
- get_codebase generates a merged markdown file of the whole codebase, paginated so a large repository does not arrive as one unusable response.
Nothing to supply — it reads the codebase it is pointed at.
One command — npx -y context-coder --mini --stdio
