Skip to main content
Glama

gitlab_get_user_open_mrs

Retrieve all open merge requests authored by a specific user across accessible GitLab projects, providing status, priority indicators, and project context for review management and workload tracking.

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

Implementation Reference

  • Handler function that executes the core logic of the gitlab_get_user_open_mrs tool by parsing arguments and calling the GitLabClient method.
    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
        )
  • MCP tool schema definition specifying input parameters, types, descriptions, and validation rules for the tool.
    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"]
        }
    ),
  • Mapping of tool name to its handler function in the TOOL_HANDLERS dictionary used for tool dispatch.
    TOOL_GET_USER_OPEN_MRS: handle_get_user_open_mrs,
  • Constant definition for the tool name string used across the codebase.
    TOOL_GET_USER_OPEN_MRS = "gitlab_get_user_open_mrs"
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool retrieves MRs 'across all accessible projects' and includes pagination behavior (via per_page and page parameters), which is useful context. However, it doesn't mention rate limits, authentication requirements, or error conditions that would be important for a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, returns, use cases, parameters, example). It's appropriately sized but could be more concise by eliminating redundant parameter listings since the schema already covers them thoroughly. Every sentence adds value, but some information is duplicated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only tool with 5 parameters and no output schema, the description does a good job explaining what information is returned (MR details, status, urgency indicators, etc.) and provides use cases. However, without annotations or output schema, it could benefit from more behavioral context about limitations or error handling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description adds minimal value beyond the schema by listing parameters and providing an example, but doesn't explain semantics like the 'priority' sort option or the relationship between user_id and username beyond what's in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get all open merge requests authored by a user' with specific verb ('Get'), resource ('open merge requests'), and scope ('authored by a user'). It distinguishes from siblings like gitlab_list_merge_requests (general listing) and gitlab_get_merge_request (single MR).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit use cases (personal MR dashboard, team workload monitoring, etc.) that guide when to use this tool. However, it doesn't explicitly state when NOT to use it or name specific alternatives among siblings (e.g., gitlab_get_user_review_requests for different MR contexts).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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