Complete pull request
complete_pull_requestMerge an active, non-draft pull request in Azure DevOps while enforcing branch policies. Provide the reviewed source commit SHA, choose a merge strategy, and confirm to complete the merge securely.
Instructions
Merge an active, non-draft PR without bypassing policies. Requires the reviewed source commit, write tools, and confirm=true.
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": {
"repositoryId": "<repositoryId>",
"pullRequestId": "<pullRequestId>",
"expectedSourceCommitId": "<expectedSourceCommitId>",
"mergeStrategy": "<mergeStrategy>",
"confirm": "<confirm>"
},
"name": "complete_pull_request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | Yes | Must be true to perform the mutation. | |
| project | No | Project name or ID. Omit to use AZURE_DEVOPS_DEFAULT_PROJECT. | |
| repositoryId | Yes | Repository name or ID. | |
| mergeStrategy | Yes | ||
| pullRequestId | Yes | Pull request numeric ID. | |
| deleteSourceBranch | No | Delete the source branch after completion; defaults to false. | |
| mergeCommitMessage | No | ||
| transitionWorkItems | No | Move linked work items to their next logical state; defaults to false. | |
| expectedSourceCommitId | Yes | Exact source commit SHA reviewed and approved for merge. |