Expand description
MCP tool-schema compression and budget enforcement.
Structs§
- Optimized
Schemas - Result of schema optimization.
- Schema
Budget - Token budget constraints for tool schemas.
- Schema
Entry - A single tool schema entry for optimization.
Functions§
- budget_
for_ coverage - Returns schema limits suited to the client’s integration coverage.
- compress_
description - Collapses whitespace and truncates a description to the requested token budget.
- estimate_
tokens - Estimates token usage using a conservative four-characters-per-token ratio.
- optimize_
schemas - Compresses and filters schemas until the supplied budget is met where possible.