get_merge_request_file_diff
Fetch diffs for specific files in a merge request using project ID, file paths, and either merge request IID or source branch.
Instructions
Get diffs for specific files from a merge request (merge_request_iid or source_branch required).
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>",
"file_paths": "<file_paths>"
},
"name": "get_merge_request_file_diff"
}
}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 URL-encoded path | |
| source_branch | No | Source branch name | |
| merge_request_iid | No | Merge request IID |