feat: Add brief mode optimization with comprehensive test suite #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces a brief mode optimization feature that achieves 95% context reduction for Redmine issue responses, making the MCP server significantly more efficient for AI applications with limited context windows.
Key Features
detail_levelparameter withbriefandfulloptionsBriefFieldOptionsinterface allows fine-grained control over included fieldsPerformance Impact
Test Coverage
Files Added
Test Files
src/formatters/__tests__/format-options.test.ts- Format option parsing and validationsrc/formatters/__tests__/field-selector.test.ts- Field selection logicsrc/formatters/__tests__/text-truncation.test.ts- Text truncation utilitiessrc/formatters/__tests__/issues.test.ts- Issue formatting (brief vs full)src/formatters/__tests__/fixtures/mock-issues.ts- Test data fixturessrc/handlers/__tests__/issues-brief.test.ts- Integration tests for handlersVersioning
.changeset/brief-mode-optimization.md- Changeset for proper semantic versioningUsage Examples
Technical Implementation
Testing
Run the test suite:
All tests pass and demonstrate the significant context reduction while maintaining essential information.
Ready for review and merge - This feature addresses the critical context window limitations while maintaining full backward compatibility.