You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: optimize MCP tool descriptions for token efficiency
- Add tiktoken dependency for accurate token counting
- Create token validation utilities in validation.py
- Optimize startPreIngestion tutorial from 191 to ~60 tokens
- Add comprehensive unit tests for token efficiency
- Update living memory files with optimization findings
Key findings:
- Existing tutorials already well-optimized (all under 200 tokens)
- Implemented soft validation with warnings for token limits
- Added fallback to character estimation for robustness
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: Architecture.md
+114Lines changed: 114 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2825,6 +2825,120 @@ The MCP manifest schema has been updated to use anyOf patterns for numeric param
2825
2825
2826
2826
This ensures compatibility with various MCP client implementations that may serialize parameters differently while maintaining strict type safety and validation.
2827
2827
2828
+
## Token Optimization
2829
+
2830
+
### Token Counting Utilities
2831
+
2832
+
The system implements comprehensive token optimization utilities in the validation module to ensure efficient context usage across the application:
This token optimization architecture ensures efficient context usage while maintaining system reliability through robust fallback mechanisms and comprehensive error handling.
0 commit comments