Merge Request
gitlab_merge_requestManage GitLab merge request lifecycle and settings: create, update, merge, close, delete, approve, rebase, list, and track time. Configure approvals, dependencies, todos, emoji, and events.
Instructions
Example: {"action":"approval_config","params":{...}} For the params schema of any action, read the MCP resource gitlab://schema/meta/gitlab_merge_request/.
Manage GitLab merge request lifecycle plus approval rules and settings, time tracking, subscriptions, context commits, MR dependencies (blocking MRs), todos, related issues, award emoji, and resource events. Delete permanently removes an MR. When to use: MR lifecycle (open/list/update/merge/close/delete/rebase), approvals at MR/group/project level, time tracking, subscriptions, context commits, MR dependencies, todos, related issues, award emoji, MR resource events. NOT for: comments, discussions, diffs, draft notes, raw diffs (use gitlab_mr_review), CI pipelines (use gitlab_pipeline; use action 'pipelines' here only to LIST MR pipelines), branches/tags (use gitlab_branch / gitlab_tag), commits in the repo (use gitlab_repository).
Returns:
list / list_global / list_group / commits / pipelines / participants / reviewers / issues_closed / related_issues / dependencies_list / approval_rules / context_commits_list / event_list / emoji_list: arrays with pagination {page, per_page, total, next_page}.
get / create / update / approve / merge / rebase / approval_state / approval_config / approval_rule_create / approval_rule_update / approval_settings_* / dependency_create / create_todo: MR, dependency, todo or settings object.
time_estimate_set / spent_time_add / time_stats / time_estimate_reset / spent_time_reset: {time_estimate, total_time_spent, human_time_estimate, human_total_time_spent}.
subscribe / unsubscribe / cancel_auto_merge / create_pipeline: updated MR or pipeline object.
delete / unapprove / approval_reset / approval_rule_delete / context_commits_delete / dependency_delete / emoji_*_delete: {success, message}. Errors: 404 (hint: confirm project_id and merge_request_iid — merge_request_iid is project-scoped, not the global ID), 403 (hint: requires Reporter+ to comment, Developer+ to merge, configured approvers to approve), 405/409 on merge (hint: WIP/draft, unresolved threads, failing pipelines or pending approvals — see approval_state).
Param conventions: * = required. Most actions need project_id*, merge_request_iid*. List actions accept page, per_page.
IMPORTANT for create: target_branch* — if user doesn't specify, retrieve project's default_branch via gitlab_project get; do NOT assume 'main'. IMPORTANT for merge: auto-detects project squash/delete-branch settings — do NOT set squash or should_remove_source_branch unless user explicitly asks.
MR lifecycle:
create: project_id*, source_branch*, target_branch*, title*, description, assignee_id, assignee_ids, reviewer_ids, labels (comma-separated), milestone_id, remove_source_branch, squash, allow_collaboration, target_project_id (forks)
get: project_id*, merge_request_iid*
list: project_id*, state (opened/closed/merged/all), labels, not_labels, milestone, scope, search, source_branch, target_branch, author_username, draft, iids, created_after/before, updated_after/before, order_by, sort
list_global / list_group: same filters as list. list_group needs group_id* instead of project_id.
update: project_id*, merge_request_iid*, title, description, target_branch, assignee_id, assignee_ids, reviewer_ids, labels, add_labels, remove_labels, milestone_id, remove_source_branch, squash, discussion_locked, allow_collaboration, state_event (close/reopen)
merge: project_id*, merge_request_iid*, merge_commit_message, squash, should_remove_source_branch, auto_merge, sha, squash_commit_message
approve / unapprove / rebase / delete / participants / reviewers / create_pipeline / cancel_auto_merge: project_id*, merge_request_iid*
rebase also accepts: skip_ci
commits / pipelines / issues_closed: project_id*, merge_request_iid*
subscribe / unsubscribe: project_id*, merge_request_iid*
Approvals:
approval_state / approval_rules / approval_config / approval_reset: project_id*, merge_request_iid*
approval_rule_create: project_id*, merge_request_iid*, name*, approvals_required*, approval_project_rule_id, user_ids, group_ids
approval_rule_update: project_id*, merge_request_iid*, approval_rule_id*, name, approvals_required, user_ids, group_ids
approval_rule_delete: project_id*, merge_request_iid*, approval_rule_id*
approval_settings_group_get / approval_settings_group_update: group_id*. Update params: allow_author_approval, allow_committer_approval, allow_overrides_approver_list_per_mr, retain_approvals_on_push, require_reauthentication_to_approve
approval_settings_project_get / approval_settings_project_update: project_id*. Same params + selective_code_owner_removals.
Time tracking:
time_estimate_set / spent_time_add: project_id*, merge_request_iid*, duration* (e.g. '3h30m', '1w2d'). spent_time_add also accepts summary.
time_estimate_reset / spent_time_reset / time_stats: project_id*, merge_request_iid*
Context commits:
context_commits_list / context_commits_create / context_commits_delete: project_id*, merge_request_iid*. create/delete need commits ([]string)*.
MR dependencies (blocking MRs):
dependencies_list: project_id*, merge_request_iid* — list MRs that block this MR from merging.
dependency_create: project_id*, merge_request_iid*, blocking_merge_request_id* (global ID of the blocking MR).
dependency_delete: project_id*, merge_request_iid*, blocking_merge_request_id*.
Todos and related issues:
create_todo: project_id*, merge_request_iid* — add this MR to the authenticated user's to-do list.
related_issues: project_id*, merge_request_iid* — list issues mentioned or linked from the MR (paginated).
Award emoji:
emoji_mr_list / emoji_mr_create / emoji_mr_delete: project_id*, merge_request_iid*, name* (create), award_id* (get/delete)
emoji_mr_get: project_id*, merge_request_iid*, award_id*
emoji_mr_note_list / emoji_mr_note_create / emoji_mr_note_delete: project_id*, merge_request_iid*, note_id*, name* (create), award_id* (get/delete)
emoji_mr_note_get: project_id*, merge_request_iid*, note_id*, award_id*
Resource events:
event_mr_label_list / event_mr_label_get: project_id*, merge_request_iid*, label_event_id* (get)
event_mr_milestone_list / event_mr_milestone_get: project_id*, merge_request_iid*, milestone_event_id* (get)
event_mr_state_list / event_mr_state_get: project_id*, merge_request_iid*, state_event_id* (get)
See also: gitlab_mr_review (comments, discussions, diffs, raw diffs, draft notes), gitlab_pipeline, gitlab_branch, gitlab_issue (linked/related issue lifecycle)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform. Pick exactly one of the values in `enum`. Each action expects its own `params` object — see the tool description for the per-action parameter list. | |
| params | No | Action-specific parameters as a JSON object. Required and optional fields differ per action; consult this tool's description for the chosen action. Send only the fields documented for that action — unknown keys are rejected with a validation error (only reserved meta keys like `confirm` are stripped before validation). For the JSON Schema of a specific action's `params`, read the MCP resource `gitlab://schema/meta/{tool}/{action}` (replace placeholders with the tool name and the chosen action). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next_steps | No | Optional. Suggested follow-up actions or tool calls for the LLM, contextual to the result. | |
| pagination | No | Present on list actions. Use `has_more` and `next_page` to paginate through results. |