Skip to main content
Glama

MR Review

gitlab_mr_review
Destructive

Post 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

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction 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.
paramsNoAction-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

TableJSON Schema
NameRequiredDescriptionDefault
next_stepsNoOptional. Suggested follow-up actions or tool calls for the LLM, contextual to the result.
paginationNoPresent on list actions. Use `has_more` and `next_page` to paginate through results.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses return types, error hints (404, 403, 400), parameter conventions, and batch review pattern. The destructiveHint: true annotation aligns with creation/deletion actions, and there is no contradiction. Adds significant context beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very long but well-organized with sections for actions, usage patterns, returns, errors, and param conventions. It is front-loaded with an example. Some redundancy exists, but the thoroughness is justified by the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity and the presence of an output schema, the description covers all actions, return types, error hints, and parameter conventions. It is complete and leaves no ambiguity for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the description adds per-action parameter lists, position object details, and error hints. It references a resource for detailed schema and provides conventions, adding meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies the tool's purpose: review and comment on GitLab merge requests, covering notes, discussions, diffs, and draft notes. It distinguishes from sibling tools like gitlab_merge_request (MR lifecycle) and gitlab_pipeline (CI pipelines).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use (post review comments, open/resolve threads, fetch diffs, batch review) and when not to use (MR lifecycle, reactions, CI pipelines). Provides a clear batch review pattern with step-by-step instructions and references sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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/jmrplens/gitlab-mcp-server'

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