Skip to main content
Glama

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
NameRequiredDescriptionDefault
project_idYesProject ID or complete URL-encoded path to project
merge_request_iidNoThe IID of a merge request
source_branchNoSource branch name

Implementation Reference

  • 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"), });
  • 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(), });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/harshmaur/gitlab-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server