Skip to main content
Glama

get_merge_request_file_diff

Read-only

Retrieve file diffs from a merge request by specifying project ID, file paths, and either merge request IID or source branch.

Instructions

Get diffs for specific files from a merge request (mergeRequestIid or branchName required)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID or complete URL-encoded path to project
merge_request_iidNoThe IID of a merge request
source_branchNoSource branch name
file_pathsYesList of file paths to retrieve diffs for (e.g. ['src/api/users.ts', 'src/repo/user.go']). Call list_merge_request_changed_files first to get the full list of changed paths.
unidiffNoPresent diff in the unified diff format. Default is false.
Behavior3/5

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

Annotations already indicate read-only. The description adds that it fetches diffs for specific files and requires either an IID or branch, but the parameter requirement ambiguity reduces transparency. No mention of behavior when multiple identifiers are provided or error cases.

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?

Description is a single sentence, but it includes an inaccurate statement about required parameters. While concise, the inaccuracy harms effectiveness.

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?

Given 5 parameters (2 required) and no output schema, the description should explain the relationship between merge_request_iid and source_branch, and what the output format looks like. It fails to do so, leaving the agent underinformed.

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 covers 100% of parameters with descriptions. The description does not add meaning beyond the schema, and the file_paths hint about calling 'list_merge_request_changed_files' first is redundantly present in the schema.

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 clearly states it gets diffs for specific files from a merge request, which is specific. However, it does not differentiate from sibling tools like 'get_merge_request_diffs' or 'get_branch_diffs', which may also retrieve diffs but with different scopes.

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 claims 'mergeRequestIid or branchName required', but the schema marks both as optional and only requires project_id and file_paths. This is misleading. No explicit guidance on when to use this tool vs alternatives like 'get_merge_request_diffs' or 'get_branch_diffs'.

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