gitlab_get_user_review_requests
Retrieve pending review requests assigned to a user in GitLab. Provides MR details, review status, priority indicators, and action items for efficient code review management and workload balancing.
Instructions
Get MRs where user is assigned as reviewer with pending action
Find all merge requests where the specified user has been assigned as a reviewer and their review/approval is still pending.
Returns pending review requests with:
MR details: title, author, description
Review status: approvals, pending reviewers
Priority indicators: age, CI status, conflicts
Action items: what review is needed
Project context: urgency, team notifications
Use cases:
Personal review queue/inbox
Team code review management
Review workload balancing
SLA compliance monitoring
Parameters:
user_id: Numeric user ID
username: Username string (use either user_id or username)
priority: Filter by priority (high, medium, low)
sort: Sort order (urgency, age, project)
per_page: Results per page (default: 20)
page: Page number (default: 1)
Example: Get high priority review requests
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number for pagination Type: integer Range: ≥1 Default: 1 Example: 3 (to get the third page of results) Note: Use with per_page to navigate large result sets | |
| per_page | No | Number of results per page Type: integer Range: 1-100 Default: 20 Example: 50 (for faster browsing) Tip: Use smaller values (10-20) for detailed operations, larger (50-100) for listing | |
| priority | No | Filter by priority | |
| sort | No | Sort order | urgency |
| user_id | No | Numeric user ID | |
| username | No | Username string |
Implementation Reference
- src/mcp_gitlab/tool_handlers.py:743-760 (handler)The main handler function that executes the gitlab_get_user_review_requests tool. It processes input arguments and delegates to GitLabClient.get_user_review_requests().def handle_get_user_review_requests(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]: """Handle getting user's pending review requests""" user_id = get_argument(arguments, "user_id") username = get_argument(arguments, "username") priority = get_argument(arguments, "priority") sort = get_argument(arguments, "sort", "urgency") per_page = get_argument(arguments, "per_page", DEFAULT_PAGE_SIZE) page = get_argument(arguments, "page", 1) return client.get_user_review_requests( user_id=user_id, username=username, priority=priority, sort=sort, per_page=per_page, page=page )
- src/mcp_gitlab/tool_handlers.py:1081-1081 (registration)The TOOL_HANDLERS dictionary maps the tool name to its handler function, used by server.py to dispatch calls.TOOL_GET_USER_REVIEW_REQUESTS: handle_get_user_review_requests,
- src/mcp_gitlab/server.py:1048-1061 (schema)The tool schema definition in the list_tools() handler, defining input parameters and validation for the tool.name=TOOL_GET_USER_REVIEW_REQUESTS, description=desc.DESC_GET_USER_REVIEW_REQUESTS, inputSchema={ "type": "object", "properties": { "user_id": {"type": "string", "description": "Numeric user ID"}, "username": {"type": "string", "description": "Username string"}, "priority": {"type": "string", "description": "Filter by priority", "enum": ["high", "medium", "low"]}, "sort": {"type": "string", "description": "Sort order", "enum": ["urgency", "age", "project"], "default": "urgency"}, "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE}, "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1} } } ),
- src/mcp_gitlab/server.py:1251-1253 (registration)In the call_tool handler, it retrieves the handler function from TOOL_HANDLERS using the tool name and executes it.handler = TOOL_HANDLERS.get(name) if not handler: raise ValueError(f"Unknown tool: {name}")
- src/mcp_gitlab/constants.py:259-259 (helper)Constant defining the exact tool name string used throughout the codebase.TOOL_GET_USER_REVIEW_REQUESTS = "gitlab_get_user_review_requests"