Skip to main content
Glama

list_merge_request_diffs

Read-only

Retrieve paginated diffs for a GitLab merge request. Provide the project ID and either the merge request IID or source branch.

Instructions

List merge request diffs with pagination (merge_request_iid or source_branch required). For one known resource, use the matching get tool. Read-only; missing resources, denied access, and rate limits return errors. project_id/group_id take a numeric ID or URL-encoded path.

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.
jmespathNoOptional JMESPath expression filtering the JSON result before return.
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.

  1. Changed1 schema field changedv2.1.66
    • addedInput schema / properties / jmespath
      Added value: +{
      +  "description": "Optional JMESPath expression filtering the JSON result before return.",
      +  "type": "string"
      +}
  2. Addedv2.1.18
  3. Removedv2.1.14
  4. Addedv2.1.11
  5. Removedv2.1.10
  6. Changed2 schema fields changedv2.1.9
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / required
      Added value: +[
      +  "project_id"
      +]
  7. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds useful non-obvious context: missing resources, denied access, and rate limits return errors, plus the project_id/group_id ID-or-path format. Lacks pagination mechanics, but adds real value 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.

Conciseness5/5

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

Three compact sentences, each earning its place: scope/routing, error behavior, and parameter format. Front-loaded with the required identification constraint.

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 paginated list tool with no output schema, the definition covers routing, error behavior, and param format adequately. It could better describe the return shape or pagination expectations, but nothing critical for correct invocation is missing.

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 coverage is 100%, so all seven parameters are documented in the schema. The description adds the ID-or-URL-encoded-path accepted format for project_id, which is helpful, but pagination params (page, per_page) are left to the schema. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb and resource ('List merge request diffs') and distinguishes itself from the singular sibling by naming 'the matching get tool' for one known resource. An agent can pick list vs get without opening schemas.

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

Usage Guidelines4/5

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

Provides a clear when-to-use rule: use this for listing, use the matching get tool for one known resource. It stops short of naming the exact alternative (get_merge_request_diffs) but the routing rule is explicit.

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