list_merge_requests
Retrieve and filter merge requests in a GitLab project using criteria like assignee, state, labels, or date ranges to manage code review workflows.
Instructions
List merge requests in a GitLab project with filtering options
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | Project ID or URL-encoded path | |
| assignee_id | No | Return issues assigned to the given user ID. user id or none or any | |
| assignee_username | No | Returns merge requests assigned to the given username | |
| author_id | No | Returns merge requests created by the given user ID | |
| author_username | No | Returns merge requests created by the given username | |
| reviewer_id | No | Returns merge requests which have the user as a reviewer. user id or none or any | |
| reviewer_username | No | Returns merge requests which have the user as a reviewer | |
| created_after | No | Return merge requests created after the given time | |
| created_before | No | Return merge requests created before the given time | |
| updated_after | No | Return merge requests updated after the given time | |
| updated_before | No | Return merge requests updated before the given time | |
| labels | No | Array of label names | |
| milestone | No | Milestone title | |
| scope | No | Return merge requests from a specific scope | |
| search | No | Search for specific terms | |
| state | No | Return merge requests with a specific state | |
| order_by | No | Return merge requests ordered by the given field | |
| sort | No | Return merge requests sorted in ascending or descending order | |
| target_branch | No | Return merge requests targeting a specific branch | |
| source_branch | No | Return merge requests from a specific source branch | |
| wip | No | Filter merge requests against their wip status | |
| with_labels_details | No | Return more details for each label | |
| page | No | Page number for pagination (default: 1) | |
| per_page | No | Number of items per page (max: 100, default: 20) |
Implementation Reference
- schemas.ts:1246-1329 (schema)Zod input schema for 'list_merge_requests' tool defining parameters for listing GitLab merge requests including project_id, pagination, state, labels, scope, search, and other filters.export const ListMergeRequestsSchema = z .object({ project_id: z.coerce.string().describe("Project ID or URL-encoded path"), assignee_id: z.coerce .string() .optional() .describe("Return issues assigned to the given user ID. user id or none or any"), assignee_username: z .string() .optional() .describe("Returns merge requests assigned to the given username"), author_id: z.coerce .string() .optional() .describe("Returns merge requests created by the given user ID"), author_username: z .string() .optional() .describe("Returns merge requests created by the given username"), reviewer_id: z.coerce .string() .optional() .describe("Returns merge requests which have the user as a reviewer. user id or none or any"), reviewer_username: z .string() .optional() .describe("Returns merge requests which have the user as a reviewer"), created_after: z .string() .optional() .describe("Return merge requests created after the given time"), created_before: z .string() .optional() .describe("Return merge requests created before the given time"), updated_after: z .string() .optional() .describe("Return merge requests updated after the given time"), updated_before: z .string() .optional() .describe("Return merge requests updated before the given time"), labels: z.array(z.string()).optional().describe("Array of label names"), milestone: z.string().optional().describe("Milestone title"), scope: z .enum(["created_by_me", "assigned_to_me", "all"]) .optional() .describe("Return merge requests from a specific scope"), search: z.string().optional().describe("Search for specific terms"), state: z .enum(["opened", "closed", "locked", "merged", "all"]) .optional() .describe("Return merge requests with a specific state"), order_by: z .enum([ "created_at", "updated_at", "priority", "label_priority", "milestone_due", "popularity", ]) .optional() .describe("Return merge requests ordered by the given field"), sort: z .enum(["asc", "desc"]) .optional() .describe("Return merge requests sorted in ascending or descending order"), target_branch: z .string() .optional() .describe("Return merge requests targeting a specific branch"), source_branch: z .string() .optional() .describe("Return merge requests from a specific source branch"), wip: z .enum(["yes", "no"]) .optional() .describe("Filter merge requests against their wip status"), with_labels_details: z.boolean().optional().describe("Return more details for each label"), }) .merge(PaginationOptionsSchema);