Skip to main content
Glama

gitlab_update_merge_request

Modify merge request properties including title, description, assignees, labels, reviewers, and state to manage code review workflows in GitLab.

Instructions

Update merge request fields Returns: Updated MR object Use when: Modifying MR properties Can update: Title, description, assignees, labels, etc.

Examples:

  • Change title: {"title": "New title"}

  • Add reviewers: {"reviewer_ids": [123, 456]}

  • Close MR: {"state_event": "close"}

Related tools:

  • gitlab_get_merge_request: Check current state

  • gitlab_close_merge_request: Just close

  • gitlab_merge_merge_request: Merge MR

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoProject identifier (auto-detected if not provided) Type: integer OR string Format: numeric ID or 'namespace/project' Optional: Yes - auto-detects from current git repository Examples: - 12345 (numeric ID) - 'gitlab-org/gitlab' (namespace/project path) - 'my-group/my-subgroup/my-project' (nested groups) Note: If in a git repo with GitLab remote, this can be omitted
mr_iidYesMerge request number (IID - Internal ID) Type: integer Format: Project-specific MR number (without !) Required: Yes Examples: - 456 (for MR !456) - 7890 (for MR !7890) How to find: Look at MR URL or title - URL: https://gitlab.com/group/project/-/merge_requests/456 → use 456 - Title: "Add new feature (!456)" → use 456 Note: This is NOT the global MR ID
titleNoTitle text Type: string Required: Yes (for create/update operations) Max length: 255 characters Format: Plain text with emoji support Examples: - 'Fix login validation bug' - '🚀 Add new feature: Dark mode' - 'Update dependencies to latest versions' Note: Supports Unicode and special characters
descriptionNoDescription content Type: string Format: GitLab Flavored Markdown (GFM) Optional: Yes Features supported: - Mentions: @username - Issue references: #123 - MR references: !456 - Task lists: - [ ] Task - Code blocks with syntax highlighting - Tables, links, images Examples: 'Fixes #123 by updating validation logic. - [x] Add input validation - [ ] Update tests cc @teamlead for review'
assignee_idNoSingle assignee user ID Type: integer Format: GitLab user ID (not username) Optional: Yes Examples: - 12345 (user's numeric ID) - null (to unassign) How to find: User profile URL or API Note: For multiple assignees, use assignee_ids instead
assignee_idsNoMultiple assignee user IDs Type: array of integers Format: List of GitLab user IDs Optional: Yes Examples: - [123, 456, 789] (assign to 3 users) - [123] (assign to 1 user) - [] (unassign all) Note: Premium feature for multiple assignees
reviewer_idsNoReviewer user IDs Type: array of integers Format: List of GitLab user IDs Optional: Yes Examples: - [234, 567] (request review from 2 users) - [234] (single reviewer) - [] (remove all reviewers) Use case: Request code review from specific team members
labelsNoLabels to apply Type: string Format: Comma-separated label names Optional: Yes Examples: - 'bug' (single label) - 'bug,priority::high' (multiple labels) - 'backend,needs-review,v2.0' (many labels) - '' (empty string to remove all labels) Note: Creates new labels if they don't exist
milestone_idNoMilestone ID Type: integer or null Format: Milestone's numeric ID Optional: Yes Examples: - 42 (assign to milestone with ID 42) - null (remove from milestone) How to find: Milestone page or API Note: Milestone must exist in the project
state_eventNoState transition Type: string (enum) Options: - 'close': Close the issue/MR - 'reopen': Reopen a closed issue/MR Optional: Yes Examples: - 'close' (mark as closed) - 'reopen' (reactivate) Use case: Change issue/MR state without other updates
remove_source_branchNoDelete source branch after merge Type: boolean Default: false Options: - true: Delete branch after successful merge - false: Keep branch after merge Requirements: User must have permission to delete Use case: Automatic cleanup of feature branches
squashNoSquash commits on merge Type: boolean Default: Follows project settings Options: - true: Combine all commits into one - false: Keep all commits - null: Use project default Use case: Clean commit history
discussion_lockedNoLock discussions Type: boolean Default: false Options: - true: Only project members can comment - false: Anyone can comment Use case: Prevent spam or off-topic comments
allow_collaborationNoAllow commits from members Type: boolean Default: true Options: - true: Upstream members can push to fork branch - false: Only fork owner can push Use case: Let maintainers fix small issues directly
target_branchNoTarget branch for merge Type: string Required: Yes Format: Existing branch name Examples: - 'main' (merge into main) - 'develop' (merge into develop) - 'release/v2.0' (merge into release branch) Note: Branch must exist in the project

Other Tools

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/Vijay-Duke/mcp-gitlab'

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