Skip to main content
Glama

gitlab_get_user_open_mrs

Retrieve all open merge requests by a specific user across projects, including details like title, status, urgency indicators, and CI pipeline state. Useful for personal MR dashboards, team workload monitoring, and code review management.

Instructions

Get all open merge requests authored by a user

Retrieve all currently open MRs created by the specified user across all accessible projects, with priority and urgency indicators.

Returns MR information including:

  • Basic details: title, description, IID

  • Status: draft, conflicts, approvals needed

  • Urgency indicators: age, reviewer assignments

  • CI status: pipeline state, test results

  • Project context: name, namespace

Use cases:

  • Personal MR dashboard

  • Team workload monitoring

  • Code review queue management

  • Sprint planning and tracking

Parameters:

  • user_id: Numeric user ID

  • username: Username string (use either user_id or username)

  • sort: Sort order (updated, created, priority)

  • per_page: Results per page (default: 20)

  • page: Page number (default: 1)

Example: Get user's open MRs sorted by update time

{ "username": "johndoe", "sort": "updated", "per_page": 10 }

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
sortNoSort orderupdated
user_idNoNumeric user ID
usernameNoUsername string

Implementation Reference

  • The core handler function that implements the tool logic. It extracts parameters from arguments and delegates to GitLabClient.get_user_open_mrs() to fetch the user's open merge requests.
    def handle_get_user_open_mrs(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]: """Handle getting user's open merge requests""" user_id = get_argument(arguments, "user_id") username = get_argument(arguments, "username") sort = get_argument(arguments, "sort", "updated") per_page = get_argument(arguments, "per_page", DEFAULT_PAGE_SIZE) page = get_argument(arguments, "page", 1) return client.get_user_open_mrs( user_id=user_id, username=username, sort=sort, per_page=per_page, page=page )
  • The tool schema definition specifying input parameters (username required, scope, draft, pagination) and validation rules.
    types.Tool( name=TOOL_GET_USER_OPEN_MRS, description=desc.DESC_GET_USER_OPEN_MRS, inputSchema={ "type": "object", "properties": { "username": {"type": "string", "description": "Username string"}, "scope": {"type": "string", "description": "MR scope", "enum": ["created", "assigned", "all"], "default": "created"}, "draft": {"type": "string", "description": "Filter by draft status", "enum": ["yes", "no", "all"], "default": "all"}, "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} }, "required": ["username"] } ),
  • Registration of the tool name to its handler function within the TOOL_HANDLERS dictionary used by the MCP server.
    TOOL_GET_USER_OPEN_MRS: handle_get_user_open_mrs,
  • Constant definition for the tool name string used across schema, registration, and descriptions.
    TOOL_GET_USER_OPEN_MRS = "gitlab_get_user_open_mrs"

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