get_merge_base
Get the best common ancestor of two Bitbucket branches, tags, or commit hashes to check ancestry by comparing the returned hash with a resolved commit.
Instructions
Get Bitbucket's best common ancestor of two branches, tags or hashes.
Useful for ancestry checks: compare the returned hash with a resolved commit.
Bitbucket returns one best ancestor, even if the graph has several.
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": {
"repo_slug": "<repo_slug>",
"base": "<base>",
"head": "<head>"
},
"name": "get_merge_base"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | ||
| head | Yes | ||
| repo_slug | Yes |