Skip to main content
Glama

list_merge_requests

Read-only

List GitLab merge requests, filtered by project, state, author, or labels. Get a paginated collection for review or audit without modifying data.

Instructions

List merge requests (without project_id: user's MRs; with project_id: project MRs). Use this for a collection of resources; choose the corresponding get tool when you already know the single resource to inspect. It is read-only and does not mutate GitLab data; missing resources, invalid identifiers, insufficient permission, and rate limits are returned as errors. When project_id or group_id is accepted, provide the numeric ID or complete URL-encoded path described by the schema; use required identifiers and pagination fields exactly as documented.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wipNoFilter merge requests against their wip status
pageNoPage number for pagination (default: 1)
sortNoReturn merge requests sorted in ascending or descending order
scopeNoReturn merge requests from a specific scope
stateNoReturn merge requests with a specific state
labelsNoArray of label names
searchNoSearch for specific terms
jmespathNoOptional JMESPath expression filtering the JSON result before return.
order_byNoReturn merge requests ordered by the given field
per_pageNoNumber of items per page (max: 100, default: 20)
author_idNoReturns merge requests created by the given user ID (integer). Mutually exclusive with author_username.
milestoneNoMilestone title
project_idNoProject ID or URL-encoded path (optional - if not provided, lists all merge requests the user has access to)
assignee_idNoReturn MRs assigned to the given user ID (integer), 'none', or 'any'. Mutually exclusive with assignee_username.
reviewer_idNoReturns merge requests which have the user as a reviewer. Must be an integer, 'none', or 'any'. Mutually exclusive with reviewer_username.
created_afterNoReturn merge requests created after the given time
source_branchNoReturn merge requests from a specific source branch
target_branchNoReturn merge requests targeting a specific branch
updated_afterNoReturn merge requests updated after the given time
created_beforeNoReturn merge requests created before the given time
updated_beforeNoReturn merge requests updated before the given time
author_usernameNoReturns merge requests created by the given username. Mutually exclusive with author_id.
assignee_usernameNoReturns merge requests assigned to the given username. Mutually exclusive with assignee_id.
reviewer_usernameNoReturns merge requests which have the user as a reviewer by username. Mutually exclusive with reviewer_id.
with_labels_detailsNoReturn more details for each label
approved_by_usernamesNoReturns merge requests approved by the given usernames (array).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.66
    • addedInput schema / properties / jmespath
      Added value: +{
      +  "description": "Optional JMESPath expression filtering the JSON result before return.",
      +  "type": "string"
      +}
  2. Addedv2.1.18
  3. Removedv2.1.14
  4. Addedv2.1.11
  5. Removedv2.1.10
  6. Changed8 schema fields changedv2.1.9
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / assignee_id / description
      Previous value: -"Return issues assigned to the given user ID. user id or none or any"New value: +"Return MRs assigned to the given user ID (integer), 'none', or 'any'. Mutually exclusive with assignee_username."
    • changedInput schema / properties / assignee_username / description
      Previous value: -"Returns merge requests assigned to the given username"New value: +"Returns merge requests assigned to the given username. Mutually exclusive with assignee_id."
    • changedInput schema / properties / author_id / description
      Previous value: -"Returns merge requests created by the given user ID"New value: +"Returns merge requests created by the given user ID (integer). Mutually exclusive with author_username."
    • changedInput schema / properties / author_username / description
      Previous value: -"Returns merge requests created by the given username"New value: +"Returns merge requests created by the given username. Mutually exclusive with author_id."
    • changedInput schema / properties / project_id / description
      Previous value: -"Project ID or URL-encoded path"New value: +"Project ID or URL-encoded path (optional - if not provided, lists all merge requests the user has access to)"
    • changedInput schema / properties / reviewer_id / description
      Previous value: -"Returns merge requests which have the user as a reviewer. user id or none or any"New value: +"Returns merge requests which have the user as a reviewer. Must be an integer, 'none', or 'any'. Mutually exclusive with reviewer_username."
    • changedInput schema / properties / reviewer_username / description
      Previous value: -"Returns merge requests which have the user as a reviewer"New value: +"Returns merge requests which have the user as a reviewer by username. Mutually exclusive with reviewer_id."
  7. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

The read-only claim repeats what readOnlyHint already provides. The description does add some behavioral context by stating that missing resources, invalid identifiers, insufficient permissions, and rate limits are returned as errors, and by calling out pagination fields. However, these are generic API behaviors and no unexpected effects are disclosed beyond that; the added value over the annotations is modest.

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

Conciseness3/5

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

The description is reasonably organized, leading with the main purpose and then giving usage context. However, the read-only sentence largely duplicates the existing annotation, and the closing instruction about identifiers and pagination is vague filler. The group_id mention also creates confusion without adding useful structure.

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

Completeness3/5

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

Given 26 documented parameters, full schema coverage, and no required parameters, the schema does most of the heavy lifting. The description covers the key decision point (project_id vs no project_id) and general error behavior, but it does not describe the return shape, which matters here because there is no output schema. It also omits any mention of the list_group_merge_requests alternative, so the overall context is adequate but not complete.

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 baseline is 3 because the schema already documents all 26 parameters. The description adds only a high-level explanation of project_id's optional role and a generic instruction to follow documented identifiers and pagination fields. The mention of 'group_id' is misleading because group_id is not in the schema, slightly reducing the semantic value of the description.

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

Purpose4/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: listing merge requests, with behavior depending on presence or absence of project_id. It also distinguishes this from single-resource 'get' tools via the collection-vs-single framing. However, it does not explicitly distinguish itself from the closely related sibling list_group_merge_requests, and the mention of group_id is confusing since group_id is not in the input schema.

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 gives practical guidance: use this for a collection of resources and use the corresponding get tool when a single resource is already known. It also explains the project_id vs no-project_id scoping. It stops short of naming the specific alternative tool (get_merge_request) or addressing when list_group_merge_requests should be chosen, so guidance is good but not fully explicit.

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

Deploy Server

Other Tools