Skip to main content
Glama

MCP GitLab Server

by Vijay-Duke

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

NameRequiredDescriptionDefault
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
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
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'
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
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
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
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
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
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
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
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
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
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

Input Schema (JSON Schema)

{ "properties": { "allow_collaboration": { "description": "Allow commits from members\nType: boolean\nDefault: true\nOptions:\n - true: Upstream members can push to fork branch\n - false: Only fork owner can push\nUse case: Let maintainers fix small issues directly", "type": "boolean" }, "assignee_id": { "description": "Single assignee user ID\nType: integer\nFormat: GitLab user ID (not username)\nOptional: Yes\nExamples:\n - 12345 (user's numeric ID)\n - null (to unassign)\nHow to find: User profile URL or API\nNote: For multiple assignees, use assignee_ids instead", "type": "integer" }, "assignee_ids": { "description": "Multiple assignee user IDs\nType: array of integers\nFormat: List of GitLab user IDs\nOptional: Yes\nExamples:\n - [123, 456, 789] (assign to 3 users)\n - [123] (assign to 1 user)\n - [] (unassign all)\nNote: Premium feature for multiple assignees", "items": { "type": "integer" }, "type": "array" }, "description": { "description": "Description content\nType: string\nFormat: GitLab Flavored Markdown (GFM)\nOptional: Yes\nFeatures supported:\n - Mentions: @username\n - Issue references: #123\n - MR references: !456\n - Task lists: - [ ] Task\n - Code blocks with syntax highlighting\n - Tables, links, images\nExamples:\n 'Fixes #123 by updating validation logic.\n \n - [x] Add input validation\n - [ ] Update tests\n \n cc @teamlead for review'", "type": "string" }, "discussion_locked": { "description": "Lock discussions\nType: boolean\nDefault: false\nOptions:\n - true: Only project members can comment\n - false: Anyone can comment\nUse case: Prevent spam or off-topic comments", "type": "boolean" }, "labels": { "description": "Labels to apply\nType: string\nFormat: Comma-separated label names\nOptional: Yes\nExamples:\n - 'bug' (single label)\n - 'bug,priority::high' (multiple labels)\n - 'backend,needs-review,v2.0' (many labels)\n - '' (empty string to remove all labels)\nNote: Creates new labels if they don't exist", "type": "string" }, "milestone_id": { "description": "Milestone ID\nType: integer or null\nFormat: Milestone's numeric ID\nOptional: Yes\nExamples:\n - 42 (assign to milestone with ID 42)\n - null (remove from milestone)\nHow to find: Milestone page or API\nNote: Milestone must exist in the project", "type": "integer" }, "mr_iid": { "description": "Merge request number (IID - Internal ID)\nType: integer\nFormat: Project-specific MR number (without !)\nRequired: Yes\nExamples:\n - 456 (for MR !456)\n - 7890 (for MR !7890)\nHow to find: Look at MR URL or title\n - URL: https://gitlab.com/group/project/-/merge_requests/456 → use 456\n - Title: \"Add new feature (!456)\" → use 456\nNote: This is NOT the global MR ID", "type": "integer" }, "project_id": { "description": "Project identifier (auto-detected if not provided)\nType: integer OR string\nFormat: numeric ID or 'namespace/project'\nOptional: Yes - auto-detects from current git repository\nExamples:\n - 12345 (numeric ID)\n - 'gitlab-org/gitlab' (namespace/project path)\n - 'my-group/my-subgroup/my-project' (nested groups)\nNote: If in a git repo with GitLab remote, this can be omitted", "type": "string" }, "remove_source_branch": { "description": "Delete source branch after merge\nType: boolean\nDefault: false\nOptions:\n - true: Delete branch after successful merge\n - false: Keep branch after merge\nRequirements: User must have permission to delete\nUse case: Automatic cleanup of feature branches", "type": "boolean" }, "reviewer_ids": { "description": "Reviewer user IDs\nType: array of integers\nFormat: List of GitLab user IDs\nOptional: Yes\nExamples:\n - [234, 567] (request review from 2 users)\n - [234] (single reviewer)\n - [] (remove all reviewers)\nUse case: Request code review from specific team members", "items": { "type": "integer" }, "type": "array" }, "squash": { "description": "Squash commits on merge\nType: boolean\nDefault: Follows project settings\nOptions:\n - true: Combine all commits into one\n - false: Keep all commits\n - null: Use project default\nUse case: Clean commit history", "type": "boolean" }, "state_event": { "description": "State transition\nType: string (enum)\nOptions:\n - 'close': Close the issue/MR\n - 'reopen': Reopen a closed issue/MR\nOptional: Yes\nExamples:\n - 'close' (mark as closed)\n - 'reopen' (reactivate)\nUse case: Change issue/MR state without other updates", "enum": [ "close", "reopen" ], "type": "string" }, "target_branch": { "description": "Target branch for merge\nType: string\nRequired: Yes\nFormat: Existing branch name\nExamples:\n - 'main' (merge into main)\n - 'develop' (merge into develop)\n - 'release/v2.0' (merge into release branch)\nNote: Branch must exist in the project", "type": "string" }, "title": { "description": "Title text\nType: string\nRequired: Yes (for create/update operations)\nMax length: 255 characters\nFormat: Plain text with emoji support\nExamples:\n - 'Fix login validation bug'\n - '🚀 Add new feature: Dark mode'\n - 'Update dependencies to latest versions'\nNote: Supports Unicode and special characters", "type": "string" } }, "required": [ "mr_iid" ], "type": "object" }

Other Tools from MCP GitLab Server

Related Tools

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