Skip to main content
Glama

Get Merge Request Version

gitlab_get_merge_request_version
Read-onlyIdempotent

Retrieves one diff version for a GitLab merge request using its version ID, so you can inspect the exact changes tied to that MR version.

Instructions

Get one MR diff version.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "merge_request_iid": "<merge_request_iid>",
      "version_id": "<version_id>"
    },
    "name": "gitlab_get_merge_request_version"
  }
}

Input Schema

NameRequiredDescriptionDefault
unidiffNo
project_idNo
version_idYes
merge_request_iidYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.7.0
    • removedInput schema / properties / unidiff / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / unidiff / type
      Added value: +[
      +  "boolean",
      +  "null"
      +]
  2. First observedv1.6.1

TDQS

C2.2/5.0
Behavior2/5

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

Annotations already declare read-only, idempotent, open-world, and non-destructive behavior, and the description adds no further behavioral context. It does not explain what is returned, whether diffs are paginated, or what the unidiff option changes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The single sentence is front-loaded and free of filler, but it is under-specified rather than genuinely concise. There is no structural element that helps the agent understand the operation or its inputs.

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

Completeness2/5

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

With four parameters, zero schema descriptions, no output schema, and an unfamiliar version_id concept, the definition is far too sparse. The annotations cover safety but do not fill in the missing meaning of the operation or its parameters.

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

Parameters1/5

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

Schema description coverage is 0% across four parameters, so the description must compensate, but it mentions no parameters at all. It gives no meaning for version_id, merge_request_iid, project_id, or unidiff.

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

Purpose3/5

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

The description states a verb and resource: get one MR diff version. It is distinguishable from listing versions, but 'diff version' is vague and does not explain what a merge request version represents or how it differs from diffs.

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?

There is no guidance on when to use this tool instead of gitlab_list_merge_request_versions, gitlab_get_merge_request_diffs, or gitlab_get_merge_request_file_diff. The only implied usage is that a caller already knows a version_id.

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

Deploy Server

Other Tools