Skip to main content
Glama

list_merge_request_diffs

Read-only

Retrieve paginated diffs for a merge request using the project ID and either the merge request IID or source branch. This read-only tool helps review changes without mutating GitLab data.

Instructions

List merge request diffs with pagination (mergeRequestIid or branchName required). Use this for a collection of resources; choose the corresponding get tool when you already know the single resource to inspect. It is read-only and does not mutate GitLab data; missing resources, invalid identifiers, insufficient permission, and rate limits are returned as errors. When project_id or group_id is accepted, provide the numeric ID or complete URL-encoded path described by the schema; use required identifiers and pagination fields exactly as documented.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination (default: 1)
unidiffNoPresent diffs in the unified diff format. Default is false. Introduced in GitLab 16.5.
per_pageNoNumber of items per page (max: 100, default: 20)
project_idYesProject ID or complete URL-encoded path to project
source_branchNoSource branch name
merge_request_iidNoThe IID of a merge request

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv2.1.18
  2. Removedv2.1.14
  3. Addedv2.1.11
  4. Removedv2.1.10
  5. Changed2 schema fields changedv2.1.9
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / required
      Added value: +[
      +  "project_id"
      +]
  6. First observedv1.0.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations provide readOnlyHint=true and openWorldHint=true, so the description's claim that it is read-only and does not mutate data aligns but adds little beyond the annotation. It does add that errors include rate limits and permission issues, which is useful context beyond annotations. However, it doesn't disclose specific behaviors like pagination defaults (though schema covers that) or potential side effects. Since annotations cover safety, a 3 is appropriate.

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 reasonably concise, with the core purpose and key usage guidance front-loaded. It uses two sentences to cover purpose, usage, and error handling. Could be slightly tighter but efficient overall.

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?

For a list tool with read-only annotation, the description covers key usage, error signaling, and distinction from get tool. There is no output schema, but for a list operation the agent can infer pagination behavior from schema. It might benefit from noting common filter combinations but is otherwise complete for a list tool.

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 has 100% coverage for 6 parameters, so the description adds limited parameter-level meaning. It does mention that project_id or group_id should be numeric or URL-encoded as per schema, which reinforces but doesn't add much new. Baseline for 100% coverage is 3, and the description does not provide substantial extra info beyond what schema already says.

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 'List' and the resource 'merge request diffs with pagination'. It names required identifiers (mergeRequestIid or branchName required) and explicitly distinguishes from the corresponding 'get' tool for single resources. This distinguishes it from siblings like get_merge_request_diffs and get_branch_diffs.

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?

It explicitly says to use this for a collection and to use the 'get' tool when you know the single resource. It also states that missing resources, invalid identifiers, insufficient permission, and rate limits are returned as errors, which guides usage and error handling.

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