GitLab ACTION
List Merge Requests
List merge requests, filtered by project, group, state, author, assignee, reviewer, labels or target branch. Use this for any "what merge requests are …" question — open MRs in a project, MRs waiting on my review (set Scope to
reviews_for_me), MRs assigned to me, MRs targeting a release branch. Use Search Merge Requests instead when you have text to match against a title or description. Set Project to scope to one project, Group to scope to a whole group, or leave both blank to search across everything the authenticated user can see — note that with both blank GitLab defaults Scope to created_by_me, so pass all to widen it. Results are summarized by default; set Detail to full for the complete merge request objects. The returned iid is what every other merge request tool needs. See the documentation- Action
- Read only
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's GitLab account once, then configure and run List Merge Requests from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "gitlab-list-merge-requests",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
gitlab: { authProvisionId: "apn_xxxxxxx" },
projectId: "Project",
groupId: "Group",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "gitlab-list-merge-requests",
"configured_props": {
"gitlab": { "authProvisionId": "apn_xxxxxxx" },
"projectId": "Project",
"groupId": "Group"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "gitlab",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "gitlab-list-merge-requests",
arguments: {
projectId: "Project",
groupId: "Group",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
projectId Project | string | Limit results to this project, given as a path ( group/project, e.g. backend/payments) or a numeric project ID. Leave blank to search across projects. Mutually exclusive with Group. Optional |
groupId Group | string | Limit results to every project in this group, given as a full path (e.g. backend) or a numeric group ID. Cannot be combined with Project — setting both is rejected. Optional |
state State | string | Return merge requests in this state. Defaults to opened, which is what "open MRs" means. Use merged for MRs that have already landed and all to ignore state entirely. Optional |
scope Scope | string | Narrow the results by the authenticated user's relationship to the merge request. reviews_for_me answers "what is waiting on my review?", assigned_to_me "what is assigned to me?", and created_by_me "what did I open?". Defaults to all. Optional |
authorUsername Author Username | string | Return only merge requests opened by this username (e.g. jdoe), not their display name. Use List Project Members to look up usernames. Optional |
assigneeUsername Assignee Username | string | Return only merge requests assigned to this username. Optional |
reviewerUsername Reviewer Username | string | Return only merge requests where this username is a reviewer. None returns merge requests with no reviewer, Any those with any reviewer. To find what is waiting on the authenticated user, set Scope to reviews_for_me instead. Optional |
labels Labels | string[] | Return only merge requests carrying all of these labels. None matches merge requests with no labels, Any those with at least one. Optional |
targetBranch Target Branch | string | Return only merge requests targeting this branch (e.g. main, release/24.1). Optional |
sourceBranch Source Branch | string | Return only merge requests originating from this branch. Optional |
updatedAfter Updated After | string | Return only merge requests updated on or after this time. ISO 8601, e.g. 2026-08-01T00:00:00Z. Optional |
orderBy Order By | string | Field to order results by. Defaults to created_at. Optional |
sort Sort | string | Sort direction. Defaults to desc (newest first). Optional |
maxResults Max Results | integer | Maximum number of records to return in total, paginating as needed. Defaults to 100. GitLab caps a single page at 100, so higher values mean multiple requests — keep it modest unless you need the whole list. Optional |
detail Detail | string | How much of each record to return. summary (the default) returns the fields needed to identify and triage a merge request and is much cheaper to read. Use full only when you need a field the summary omits. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- gitlab-list-merge-requests
- Version
- 0.0.1
- App
- GitLab
- Authentication
- OAuth
- Read-only
- Yes
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗