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_discussions boolean parameter to the get_issue tool (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: true where discussions are expected

Testing

  • All existing tests pass with include_discussions: true where 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

Merge request reports

Loading