Skip to content

Conversation

@huozhi
Copy link
Member

@huozhi huozhi commented Nov 21, 2025

init tool was always loading llms.txt content into the response which increased around 10-15k tokens.
image

After migrating them to dynamic mcp resources, it saved a lot of token.

Token Reduction:
- Before: ~17,500 tokens (init includes full llms.txt)
- After: ~1,813 tokens (init is compact)
- Reduction: ~90% fewer tokens

The process is not changed, still loading the llms.txt, but instead showing into tool response, now they're added as mcp resources

@huozhi huozhi force-pushed the add-nextjsdocs-as-resources branch from a41e812 to c03b6ca Compare November 21, 2025 13:12
@huozhi huozhi marked this pull request as ready for review November 21, 2025 13:12
@huozhi huozhi requested a review from gaojude November 21, 2025 13:12
@huozhi huozhi force-pushed the add-nextjsdocs-as-resources branch from c03b6ca to 15b15b7 Compare November 21, 2025 14:32
@huozhi huozhi merged commit b892260 into main Nov 21, 2025
3 checks passed
@huozhi huozhi deleted the add-nextjsdocs-as-resources branch November 21, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants