Merge pull request
bb_merge_pull_requestMerge a Bitbucket pull request with an optional commit message and strategy; after a 409 conflict, re-run canMerge before merging again.
Instructions
Merge a pull request with optional message and strategy (merge-commit | squash | fast-forward; translated to Cloud ids merge_commit | squash | fast_forward). On 409 (Server/DC) the merge is NOT retried automatically — a new commit likely landed; re-run canMerge then merge again.
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": {
"projectKey": "<projectKey>",
"repositorySlug": "<repositorySlug>",
"pullRequestId": "<pullRequestId>"
},
"name": "bb_merge_pull_request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | Merge commit message. | |
| strategy | No | Merge strategy id (server default applies when omitted). | |
| projectKey | Yes | Project key (target repository; on Cloud: workspace slug). | |
| pullRequestId | Yes | Pull request id. | |
| repositorySlug | Yes | Target repository slug. |