Search Merge Requests
search_merge_requestsSearch GitLab merge requests by username, author, assignee, or within a project. Filter by state, sort order, and paginate results for comprehensive MR discovery.
Instructions
Search merge requests by username (supports "username", "author:username", "assignee:username") or search within a specific project. Note: GitLab does not support global text search for MRs - use projectPath for text searches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort order (e.g., UPDATED_DESC, CREATED_DESC, CREATED_ASC). Defaults to UPDATED_DESC for recency. | |
| after | No | Pagination cursor. To fetch the next page, pass the previous response pageInfo.endCursor here and repeat until pageInfo.hasNextPage is false. Paginating this way is the reliable path to complete results and accurate totals. | |
| first | No | Number of merge requests to retrieve | |
| state | No | Filter by merge request state (opened, closed, merged, all) | all |
| fetchAll | No | Fetch multiple pages in one call, up to "first" items total (max 100) — NOT exhaustive. For complete results or accurate counts, leave this false and paginate via after (pageInfo.endCursor). | |
| searchTerm | Yes | Username (e.g., "cdhanlon", "author:username", "assignee:username") or text when projectPath provided | |
| projectPath | No | Project path (e.g., "group/project"). Required for text searches, optional for username searches. | |
| userCredentials | No | Your GitLab credentials (optional — falls back to the configured env token if not provided) |