Skip to main content
Glama

get_merge_request_version

Read-only

Retrieve a specific diff version of a merge request by providing project ID, merge request IID, and version ID. Get exact changes for a known version without modifying GitLab data.

Instructions

Get a specific version of a merge request. Use this for a known resource or result; choose the corresponding list or search tool when you need to discover multiple resources. 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
unidiffNoPresent diffs in the unified diff format. Default is false. Introduced in GitLab 16.5.
project_idYesProject ID or complete URL-encoded path to project
version_idYesThe ID of the merge request diff version
merge_request_iidYesThe internal ID of the 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. Addedv2.1.9

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true. The description confirms the read-only nature and also discloses meaningful additional behavioral context: that missing resources, invalid identifiers, insufficient permission, and rate limits surface as errors. This adds auth/permission and rate-limit context well beyond the structured annotations, which is exactly the kind of enrichment the rubric rewards.

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?

Four sentences with each earning its place: purpose, usage, behavior, and parameters. The core function is front-loaded in the first sentence. A minor deduction for the final clause 'use required identifiers and pagination fields exactly as documented' which is vague filler — the schema has no pagination fields — making that sentence do less work than it could.

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 GET with 100% schema coverage and no output schema, the description covers the essentials: it tells the agent the identifier format expectations, confirms the operation is non-mutating, and spells out error conditions. The only gap is the misfiring pagination/group_id language that suggests a template copy-paste, but nothing critical is missing for an agent to call this correctly.

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 baseline is 3 per the rubric. The description adds useful guidance that project_id can be a 'numeric ID or complete URL-encoded path', which genuinely helps invocation. However, the phrasing 'When project_id or group_id is accepted' references group_id — which is not a parameter in this schema — slightly muddying an otherwise clear instruction. Net value is modest, keeping it at baseline.

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 states a specific verb and resource — 'Get a specific version of a merge request' — and reinforces the narrow scope with 'for a known resource or result,' which clearly differentiates it from the discovery-oriented siblings like list_merge_request_versions or get_merge_request. An agent can immediately tell this is the single-version fetch, not the list or the diff tool.

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 when to use this tool — 'for a known resource or result' — and explicitly when not to: 'choose the corresponding list or search tool when you need to discover multiple resources.' This gives the agent a direct decision rule to select between this tool and its siblings without naming a specific one, which fully satisfies the when/when-not criteria.

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