get_merge_request_file_diff
Retrieve diffs for specific files in a merge request by supplying project ID and file paths. Use this after listing changed files to inspect exact modifications without altering GitLab data.
Instructions
Get diffs for specific files from a merge request (mergeRequestIid or branchName required). 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
| Name | Required | Description | Default |
|---|---|---|---|
| unidiff | No | Present diff in the unified diff format. Default is false. | |
| file_paths | Yes | List 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. | |
| project_id | Yes | Project ID or complete URL-encoded path to project | |
| source_branch | No | Source branch name | |
| merge_request_iid | No | The IID of a merge request |