forked from zereight/gitlab-mcp
-
Notifications
You must be signed in to change notification settings - Fork 1
browse_mr_discussions hangs without default pagination #97
Copy link
Copy link
Description
Problem
browse_mr_discussions with action list can hang for extended periods (observed 80+ seconds) when fetching discussions without explicit per_page parameter.
Root Cause Analysis
- No default pagination - Unlike other tools that use
PaginationOptionsSchemawithper_pagedefault of 20,browse_mr_discussionshas no default - Large response payload - Discussion responses include:
- Full diff context for each discussion
- Position data (base_sha, head_sha, paths, line numbers)
- Nested notes with full content
- System notes and metadata
- Production timeout too high - 300 seconds allows requests to hang too long
Evidence from Logs
Jan 21 23:49:29 - Executing tool: browse_mr_discussions
Jan 21 23:50:49 - Next request (80 seconds later, no completion log)
No completion or error logged - request just hangs.
Solution
- Add default
per_page: 20toListMrDiscussionsSchema - Update tool description to document the default
- Reduce default timeout from 300s to 20s
Affected Code
src/entities/mrs/schema-readonly.ts- ListMrDiscussionsSchemasrc/entities/mrs/registry.ts- tool descriptionsrc/config.ts- API_TIMEOUT_MS default
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels