Dedupe Variant Get response & added verbose flag for logging #85
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.
Pull Request: Optimize Variant Output for LLM Consumption
🎯 Summary
Implements compact formatting for variant queries and adds verbose logging control to optimize BioMCP for LLM consumption while preserving all data and functionality.
📊 Key Improvements
Token Reduction (~90-95%)
rs113488022reduced from 7,716 words → 565 wordsClean Output by Default
--verbose/-vflag for detailed debug logs🔧 Changes
New Files:
src/biomcp/variants/formatter.py- Compact variant formatting logictests/tdd/variants/test_formatter.py- 20 comprehensive unit testsModified Files:
src/biomcp/variants/getter.py- Integrated compact formatting (default) + extensive modesrc/biomcp/cli/variants.py- Added--extensiveflagsrc/biomcp/cli/main.py- Added--verbose/-vglobal flagtests/tdd/variants/test_getter.py- Added 3 new tests, updated 2 existing tests🎨 Features
Compact Format (Default)
biomcp variant get rs113488022 # Clean, consolidated output optimized for LLMsExtensive Format (Optional)
biomcp variant get rs113488022 --extensive # Full raw details with all 35+ prediction toolsVerbose Logging (Optional)
biomcp --verbose variant get rs113488022 # Show detailed INFO logs for debuggingJSON Output (Unchanged)
biomcp variant get rs113488022 --json # Always returns complete unmodified data✅ Quality Assurance
make checkpasses (0 errors)--extensiveflag🔍 Technical Details
Compact Format Consolidates:
What's Preserved:
🎯 Use Cases
For LLM Applications:
For Debugging:
--verboseflag shows detailed processing logs--extensiveflag reveals all raw prediction data--jsonprovides complete programmatic access