Compare Branches Tool
compare_branches_toolCompare two branches, tags, or commits in a GitLab project to identify differences between refs. Use it to review changes before merging or inspect divergence.
Instructions
Compare two branches, tags, or commits.
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>",
"from_ref": "<from_ref>",
"to_ref": "<to_ref>"
},
"name": "compare_branches_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_ref | Yes | Head branch/tag/commit | |
| from_ref | Yes | Base branch/tag/commit | |
| straight | No | Use straight comparison instead of merge-base (default: false) | |
| project_id | Yes | Project ID or path |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||