get_merge_request_diffs
Retrieve a merge request's changes and diffs by IID or source branch, with optional file exclusion patterns and inline or parallel view.
Instructions
Get the changes/diffs of a merge request (merge_request_iid or source_branch required). To find resources, use the matching list or search tool.
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": {
"project_id": "<project_id>"
},
"name": "get_merge_request_diffs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | No | Diff view type | |
| jmespath | No | Optional JMESPath expression filtering the JSON result before return. | |
| project_id | Yes | Project ID or URL-encoded path | |
| source_branch | No | Source branch name | |
| merge_request_iid | No | Merge request IID | |
| excluded_file_patterns | No | Array of regex patterns to exclude files from the diff results. Each pattern is an RE2 regular expression that matches file paths to ignore. RE2 runs in linear time but does not support lookahead, lookbehind, or backreferences. At most 50 patterns of at most 200 characters each. Examples: ["^vendor/", "^test/mocks/", "\.spec\.ts$", "package-lock\.json"] |