get_merge_request_file_diff
Retrieve diffs for specific files in a GitLab merge request to review code changes. Requires merge request IID or source branch; returns errors for missing resources or rate limits.
Instructions
Get diffs for specific files from a merge request (merge_request_iid or source_branch required). 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
| Name | Required | Description | Default |
|---|---|---|---|
| unidiff | No | Present diff in the unified diff format. Default is false. | |
| jmespath | No | Optional JMESPath expression filtering the JSON result before return. | |
| 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 |