gitlab_update_merge_request
Modify merge request properties on GitLab by updating title, description, assignees, labels, state, or other fields. Use this tool to adjust MR details, add reviewers, close requests, or enable branch cleanup.
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
Name | Required | Description | Default |
---|---|---|---|
allow_collaboration | No | Allow 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 | |
assignee_id | No | Single 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_ids | No | Multiple 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 | |
description | No | Description 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' | |
discussion_locked | No | Lock discussions Type: boolean Default: false Options: - true: Only project members can comment - false: Anyone can comment Use case: Prevent spam or off-topic comments | |
labels | No | Labels 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_id | No | Milestone 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 | |
mr_iid | Yes | Merge 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 | |
project_id | No | Project 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 | |
remove_source_branch | No | Delete 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 | |
reviewer_ids | No | Reviewer 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 | |
squash | No | Squash 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 | |
state_event | No | State 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 | |
target_branch | No | Target 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 | |
title | No | Title 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 |