Skip to main content
Glama
bitbucket-mcp

bitbucket-mcp

by nevzatcirak

Check pull request mergeability

bb_can_merge_pull_request

Analyze pull request merge eligibility in read-only mode: return canMerge, conflicted flag, and veto details with summary and detail messages.

Instructions

Read-only merge veto analysis for a pull request: canMerge, conflicted flag and the list of vetoes with summary/detail messages. On Cloud the analysis derives from the PR state and the conflicts pre-check (no server-side veto API).

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_can_merge_pull_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectKeyYesProject key (target repository; on Cloud: workspace slug).
pullRequestIdYesPull request id.
repositorySlugYesTarget repository slug.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does usefully disclose the read-only nature, the return shape, and a platform caveat that Cloud results are derived from PR state plus the conflicts pre-check because no server-side veto API exists — a genuinely valuable fidelity warning. However, it omits permission/auth requirements, error behavior, and whether the result is authoritative on Server, which matter for a tool whose whole value is a reliable go/no-go signal.

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?

Two sentences, both front-loaded: the first defines the operation and its outputs, the second carries the platform caveat. Nothing is redundant or padded.

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?

With no output schema and no annotations, the description does the necessary work: it explains the returned fields and warns about the Cloud-vs-Server difference. It falls short only on operational context such as permissions and failure modes for a tool used as a merge gate.

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%, with all three required parameters documented in the schema, so the baseline is 3. The description adds no parameter-level meaning such as how pullRequestId relates to projectKey/repositorySlug or Cloud workspace-slug nuances beyond what the schema already states.

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

Purpose4/5

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

The description states a specific verb and resource ('Read-only merge veto analysis for a pull request') and enumerates what it returns (canMerge, conflicted flag, veto list with summary/detail). It contrasts implicitly with the mutating bb_merge_pull_request by emphasizing 'read-only' and 'veto analysis', though it never names the sibling explicitly.

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

Usage Guidelines3/5

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

Usage is only implied — an agent can infer this is a pre-merge check, but the description never says 'call before merging' or when to prefer it over bb_merge_pull_request or bb_get_pull_request. No exclusions or prerequisites are given, leaving the routing decision to inference.

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