Skip to main content
Glama

gitlab_get_merge_request_changes

Retrieve detailed file changes and complete diffs for a GitLab merge request to review code modifications with full context.

Instructions

Get detailed MR file changes Returns: Complete diffs for all files Use when: Reviewing code changes Shows: Full file diffs with context

Similar to commit diff but for entire MR Includes all commits in the MR

Related tools:

  • gitlab_get_merge_request: MR overview

  • gitlab_smart_diff: Customizable diffs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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
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
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: it returns 'Complete diffs for all files', 'Full file diffs with context', and includes 'all commits in the MR'. However, it doesn't mention potential limitations like rate limits, authentication needs, or pagination behavior, which would be helpful for a read operation.

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

Conciseness5/5

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

The description is well-structured with bullet-like sections (Returns, Use when, Shows) and a related tools list. Every sentence adds value: the first line states the purpose, subsequent lines provide context and comparisons, and the final section clarifies sibling relationships. No wasted words.

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

Completeness4/5

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

Given the tool's moderate complexity (read operation with 2 parameters), no annotations, and no output schema, the description does a good job explaining what the tool returns ('Complete diffs', 'Full file diffs with context') and when to use it. However, it could benefit from more detail on output format or error conditions to be fully complete.

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

Parameters3/5

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

Schema description coverage is 100%, providing detailed documentation for both parameters. The description adds no parameter-specific information beyond what's in the schema, so it meets the baseline of 3. It doesn't compensate but doesn't need to given the comprehensive 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 clearly states the tool's purpose with specific verbs ('Get detailed MR file changes') and resources ('MR file changes', 'Complete diffs for all files'). It effectively distinguishes from siblings like 'gitlab_get_merge_request' (overview) and 'gitlab_smart_diff' (customizable diffs) by specifying it returns complete diffs for all files in the MR.

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?

The description provides explicit usage guidance with 'Use when: Reviewing code changes' and lists related tools with clear distinctions ('gitlab_get_merge_request: MR overview', 'gitlab_smart_diff: Customizable diffs'). This tells the agent precisely when to use this tool versus alternatives.

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/Vijay-Duke/mcp-gitlab'

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