Skip to main content
Glama
GitLab MCP Server

GitLab MCP Server

by ttpears

MR Diffs

get_merge_request_diffs
Read-onlyIdempotent

Retrieve merge request diff statistics, including per-file additions, deletions, and diff refs, to assess code changes and review scope.

Instructions

Get diff statistics for a merge request, including per-file additions/deletions and diff refs

Input Schema

NameRequiredDescriptionDefault
iidYesMerge request IID
projectPathYesFull path of the project (e.g., "group/project-name")
userCredentialsNoYour GitLab credentials (optional — falls back to the configured env token if not provided)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.0.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / userCredentials / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "accessToken": {
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "gitlabUrl": {
      -        "format": "uri",
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "accessToken": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "gitlabUrl": {
      +        "format": "uri",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed1 schema field changedv1.15.0
    • changedInput schema / properties / userCredentials / description
      Previous value: -"Your GitLab credentials (optional - uses shared token if not provided)"New value: +"Your GitLab credentials (optional — falls back to the configured env token if not provided)"
  3. First observedv1.7.3

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare this as a safe read-only, idempotent, non-destructive operation. The description adds useful context by specifying that it returns diff statistics and diff refs rather than full diff content, but it does not describe pagination, response shape, or any limits beyond what annotations provide.

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 efficient sentence with the core purpose front-loaded. It contains no redundant or filler language.

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 simple read-only retrieval tool with fully documented parameters and annotations covering safety, the description gives an adequate high-level account of the returned data. It does not fully specify the response structure, but with no output schema present, this is a minor gap rather than a blocking omission.

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%, so the schema already documents projectPath, iid, and optional userCredentials. The description adds no additional parameter semantics or constraints beyond what the schema provides, which is the baseline expectation.

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

Purpose4/5

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

The description gives a specific verb and resource: get diff statistics for a merge request. It also identifies the returned content as per-file additions/deletions and diff refs, making the purpose clear, though it does not explicitly distinguish itself from related siblings such as get_merge_request_context or browse_repository.

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

Usage Guidelines2/5

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

The description states what the tool returns but gives no guidance on when to use it versus alternatives. It does not mention prerequisites, exclusions, or related tools, so the agent must infer usage from the name and purpose alone.

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