Skip to the content.

Does the docshelf pattern actually save tokens?

The README explains the mechanism — hand the model a tiny INDEX.md, let it fetch only the one section it needs. This page measures whether the mechanism actually pays off, on two real shelves:

Tokens to answer one question — docshelf vs loading everything

The numbers

To answer a question whose answer lives in one section of one document, an LLM can (A) dump the whole collection into context, (B) load the whole containing manual, or (C) do it the docshelf way — read INDEX.md, then fetch just that section.

Shelf Docs / sections INDEX.md Whole collection (A) Biggest document (B) docshelf: INDEX + 1 section (C) Savings
HomeLab 24 / 3,055 3.5K 1.22M 1.05M (RouterOS) 3.7K 99.7% vs collection
Une Vie 1 / 16 0.7K 111K 111K 7.8K 93% vs the book

Two things stand out:

Methodology

Reproduce it (on these shelves, or your own)

git clone https://github.com/ignatenkofi/docshelf-mcp
python docshelf-mcp/benchmarks/token_savings.py /path/to/your/shelf
# exact GPT tokens instead of the estimate:
python docshelf-mcp/benchmarks/token_savings.py --tiktoken /path/to/your/shelf

Point it at any shelf (a directory with an INDEX.md and a docs/ tree) to get your own numbers. The script and the chart generator live in benchmarks/.


Back to the docshelf-mcp landing page · repo.