Skip to main content
Glama

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

{ "username": "johndoe", "priority": "high", "sort": "urgency" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage 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_pageNoNumber 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
priorityNoFilter by priority
sortNoSort orderurgency
user_idNoNumeric user ID
usernameNoUsername string

Implementation Reference

  • 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 )
  • 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,
  • 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} } } ),
  • 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}")
  • Constant defining the exact tool name string used throughout the codebase.
    TOOL_GET_USER_REVIEW_REQUESTS = "gitlab_get_user_review_requests"

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vijay-Duke/mcp-gitlab'

If you have feedback or need assistance with the MCP directory API, please join our Discord server