MR Review
gitlab_mr_reviewPost and manage review comments on GitLab merge requests: threaded discussions, inline code annotations, draft notes for batch review, and diff version comparisons. Queue drafts and publish as a single review notification.
Instructions
Example: {"action":"changes_get","params":{...}} For the params schema of any action, read the MCP resource gitlab://schema/meta/gitlab_mr_review/.
Review and comment on GitLab merge requests: notes, threaded discussions (inline + general), code diffs, draft notes (batch review), diff versions, and the per-version diff payload. When to use: post review comments, open or resolve discussion threads, fetch the diff to comment inline, queue draft notes during a session and publish them as a single review. NOT for: MR lifecycle — create/update/merge/approve/rebase/delete (use gitlab_merge_request), reactions on MR notes (use gitlab_merge_request emoji_mr_note_*), CI pipelines on the MR (use gitlab_pipeline or gitlab_merge_request pipelines).
IMPORTANT — batch review pattern: call draft_note_create once per comment (with position for inline comments, or in_reply_to_discussion_id for replies), then draft_note_publish_all ONCE to send a single notification. Use discussion_create only for standalone questions that need immediate visibility.
Returns:
*_list: array with pagination (page, per_page, total, next_page).
note_, discussion_, draft_note_, diff_: resource object(s) with id, body/note, author, position (when inline).
changes_get: {changes: [{old_path, new_path, diff, ...}], truncated_files} — if truncated, use diff_versions_list + diff_version_get, or raw_diffs for the full unified diff payload.
raw_diffs: {raw_diff: string} — full unified diff for the MR head; ideal when changes_get returns truncated_files.
*_delete / *_publish: {success: bool, message: string}. Errors: 404 not found (hint: check note_id/discussion_id and merge_request_iid), 403 forbidden (hint: requires Reporter+ to comment), 400 invalid params (hint: position requires base_sha + start_sha + head_sha + new_path/old_path + new_line/old_line).
Param conventions: * = required. All actions need project_id*, merge_request_iid*. List actions accept page, per_page. position object: {base_sha, start_sha, head_sha, new_path, old_path, new_line (added/modified), old_line (removed), both lines for unchanged context}.
Notes (general comments):
note_list: order_by (created_at/updated_at), sort
note_get / note_delete: note_id*
note_create: body*
note_update: note_id*, body*
Discussions (threaded, can be inline via position):
discussion_list
discussion_get: discussion_id*
discussion_create: body*, position (inline)
discussion_reply: discussion_id*, body*
discussion_resolve: discussion_id*, resolved* (bool)
discussion_note_update: discussion_id*, note_id*, body, resolved
discussion_note_delete: discussion_id*, note_id*
Changes and diff versions:
changes_get: returns file diffs; check truncated_files
raw_diffs: project_id*, merge_request_iid* — returns the full raw unified diff for the MR head (use when changes_get reports truncated_files)
diff_versions_list: list MR diff revisions
diff_version_get: version_id*, unidiff (bool)
Draft notes (batch review):
draft_note_list: order_by, sort
draft_note_get: note_id*
draft_note_create: note*, commit_id, in_reply_to_discussion_id, resolve_discussion (bool), position
draft_note_update: note_id*, note, position
draft_note_delete / draft_note_publish: note_id*
draft_note_publish_all: publishes ALL pending drafts as a single review notification
See also: gitlab_merge_request (MR lifecycle, approvals, merge, time tracking, reactions), gitlab_pipeline (MR pipelines), gitlab_repository (file blame for context).
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. |