get_merge_request
Retrieve merge request details from GitLab projects by providing project ID and either merge request IID or source branch name.
Instructions
Get details of a merge request (Either mergeRequestIid or branchName must be provided)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID or complete URL-encoded path to project | |
| merge_request_iid | No | The IID of a merge request | |
| source_branch | No | Source branch name |
Implementation Reference
- schemas.ts:879-882 (schema)Zod input schema for the get_merge_request tool, defining parameters like project_id, merge_request_iid, and source_branch.export const GetMergeRequestSchema = ProjectParamsSchema.extend({ merge_request_iid: z.number().optional().describe("The IID of a merge request"), source_branch: z.string().optional().describe("Source branch name"), });
- schemas.ts:613-647 (schema)Zod output schema for merge request data returned by the get_merge_request tool.export const GitLabMergeRequestSchema = z.object({ id: z.number(), iid: z.number(), project_id: z.number(), title: z.string(), description: z.string().nullable(), state: z.string(), merged: z.boolean().optional(), draft: z.boolean().optional(), author: GitLabUserSchema, assignees: z.array(GitLabUserSchema).optional(), reviewers: z.array(GitLabUserSchema).optional(), source_branch: z.string(), target_branch: z.string(), diff_refs: GitLabMergeRequestDiffRefSchema.nullable().optional(), web_url: z.string(), created_at: z.string(), updated_at: z.string(), merged_at: z.string().nullable(), closed_at: z.string().nullable(), merge_commit_sha: z.string().nullable(), detailed_merge_status: z.string().optional(), merge_status: z.string().optional(), merge_error: z.string().nullable().optional(), work_in_progress: z.boolean().optional(), blocking_discussions_resolved: z.boolean().optional(), should_remove_source_branch: z.boolean().nullable().optional(), force_remove_source_branch: z.boolean().nullable().optional(), allow_collaboration: z.boolean().optional(), allow_maintainer_to_push: z.boolean().optional(), changes_count: z.string().nullable().optional(), merge_when_pipeline_succeeds: z.boolean().optional(), squash: z.boolean().optional(), labels: z.array(z.string()).optional(), });