Skip to main content
Glama
Azure DevOps MCP Server

Azure DevOps MCP Server

merge_pull_request

Complete active Azure DevOps pull requests immediately or enable/cancel auto-complete with merge strategy, source branch deletion, work item transitions, and policy bypass.

Instructions

Complete (merge) an active pull request immediately or enable/cancel auto-complete with merge strategy, source branch deletion, work item transitions, and policy bypass options (repositoryId optional; derived from pullRequestId when omitted; works on both Azure DevOps Services and Azure DevOps Server)

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": {
      "pullRequestId": "<pullRequestId>"
    },
    "name": "merge_pull_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectIdNoThe ID or name of the project (Default: MyProject; derived from pullRequestId when omitted and no default project is configured)
autoCompleteNoSet true to enable auto-complete (merge automatically once policies pass), false to cancel auto-complete, or omit to complete/merge immediately
bypassPolicyNoExplicitly bypass branch policies when completing (requires Bypass Policies permission)
bypassReasonNoReason recorded when bypassPolicy is true
repositoryIdNoThe ID or name of the repository (optional; derived from pullRequestId when omitted)
mergeStrategyNoMerge strategy: noFastForward (standard merge commit), squash, rebase, or rebaseMerge (optional; defaults to repository policy when omitted)
pullRequestIdYesThe ID of the pull request to merge or complete
deleteSourceBranchNoDelete the source branch after the pull request completes
mergeCommitMessageNoCustom commit message for the merge or squash commit
transitionWorkItemsNoTransition linked work items to the next logical state upon completion
lastMergeSourceCommitIdNoOptional expected source head commit SHA for optimistic concurrency; if omitted during immediate completion, fetched automatically from the pull request
autoCompleteIgnoreConfigIdsNoOptional policy configuration IDs that auto-complete should not wait for (requires autoComplete: true; only applies to optional policies)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.11

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With only readOnlyHint=false supplied, the description carries the burden and does disclose meaningful consequences: source branch deletion, work item transitions, and policy bypass. It also notes dual-platform support (Services and Server) and the repositoryId derivation, though it does not state what happens when policies block the merge or whether the action is reversible.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the primary action first and the parameter families and derivation rule in a parenthetical. No filler; every clause adds information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter mutation tool with no output schema and minimal annotations, the definition covers modes, key side effects, and platform scope. It leaves the failure/blocked-policy outcome and any return-value expectation unstated, which is a modest gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents every parameter including the autoComplete tri-state and repositoryId derivation. The description restates repositoryId derivation rather than adding meaning beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb (complete/merge) and resource (active pull request), and explicitly enumerates the three modes — immediate merge, enable auto-complete, cancel auto-complete — so an agent can distinguish this from update_pull_request or get_pull_request at a glance.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The three operating modes are spelled out and the decision is delegated to the autoComplete parameter, giving clear situational context. It stops short of naming an alternative sibling (e.g., when to use update_pull_request instead) or stating when-not to merge at all.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.