Compare Branches
compare_branchesShow what merging one branch into another branch of the same project would change. projectId is always the TARGET (the branch merged into); sourceProjectId is the branch merged in.
Output: changed files, every conflict with its marker text, the migration script, key conflicts, new env vars the target lacks, missing resources, and targetVersion / sourceVersion for start_merge.
With no conflicts it also starts the pre-merge checks in the background. Neither branch is changed.
Conflicts: a merge from x into y edits y; a merge into main edits the source branch (main is never edited by a merge). Fix each conflicted file there with edit_file / apply_patch so it holds both sides' changes.
When to use: the user asks to merge branches, what a merge would change, or to fix a failed merge. Flow: compare_branches → read_merge_conflict and fix each conflict → static/__dev/migration.js if the database or storage must change (get_guides("fork")) → compare_branches → start_merge → get_merge_status.
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": {
"projectId": "<projectId>",
"sourceProjectId": "<sourceProjectId>"
},
"name": "compare_branches"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | ||
| sourceProjectId | Yes |