feat: Make issue discussions fetching optional
Summary
Makes issue discussions fetching optional through a new include_discussions parameter to reduce context window usage when discussions aren't needed.
Background
When fetching GitLab issues, discussions are often not required for the task at hand but can consume significant context window space, especially for issues with lengthy discussion threads. This change makes discussion fetching opt-in rather than automatic.
Changes
- Added
include_discussionsboolean parameter to theget_issuetool (default:false) - Discussions are only fetched when explicitly requested
- Discussion fetch errors are silently ignored (they're optional data)
- Updated tests to pass
include_discussions: truewhere discussions are expected
Testing
- All existing tests pass with
include_discussions: truewhere needed - Added test case for fetching issues without discussions
- Verified error handling for optional discussion fetching
Impact
- Breaking change: Tools that expect discussions by default must now explicitly set
include_discussions: true - Reduces token usage when discussions aren't needed
- Improves performance for simple issue queries