Skip to main content
Glama

get_merge_request_diffs

Read-only

Retrieve the changes/diffs of a merge request by providing its IID or source branch. Filter files with regex patterns.

Instructions

Get the changes/diffs of a merge request (mergeRequestIid or branchName required)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID or complete URL-encoded path to project
merge_request_iidNoThe IID of a merge request
source_branchNoSource branch name
viewNoDiff view type
excluded_file_patternsNoArray of regex patterns to exclude files from the diff results. Each pattern is a JavaScript-compatible regular expression that matches file paths to ignore. Examples: ["^vendor/", "^test/mocks/", "\.spec\.ts$", "package-lock\.json"]
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, indicating a safe read operation. The description adds no further behavioral traits like auth needs, rate limits, or output specifics. It does not contradict annotations.

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 a single, concise sentence (10 words) that is front-loaded with the core action and required inputs. No unnecessary words or redundancy.

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

Completeness3/5

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

Given the tool has 5 parameters and no output schema, the description is minimal. It does not explain the output format (e.g., unified diff), pagination, or how to handle large diffs. While parameters are well-documented in schema, more context on usage scope would improve completeness.

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

Parameters4/5

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

Schema coverage is 100% with all parameters described. The description adds value by stating that either mergeRequestIid or branchName is required, a constraint not in the schema (schema only requires project_id). This guides parameter selection beyond schema alone.

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 verb 'Get' and the resource 'changes/diffs of a merge request', specifying the required identifiers (mergeRequestIid or branchName). It distinguishes the tool from siblings like list_merge_request_diffs or get_merge_request_file_diff.

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

Usage Guidelines3/5

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

The description implies usage by stating required parameters but does not explicitly guide when to use this tool versus alternatives such as list_merge_request_diffs or get_branch_diffs. No when-not or exclusion context is provided.

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

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