Skip to main content
Glama
bitbucket-mcp

bitbucket-mcp

by nevzatcirak

Create pull request

bb_create_pull_request

Open a pull request between source and target branches, including fork repositories. Pre-fills reviewers when available; otherwise reviewers must be added manually.

Instructions

Open a pull request. Supports forks via fromProjectKey/fromRepositorySlug. Tries the required-reviewers service first to pre-fill reviewers; if it is unavailable (400/404) the tool proceeds and notes that reviewers must be added manually.

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>",
      "title": "<title>",
      "fromBranch": "<fromBranch>",
      "toBranch": "<toBranch>"
    },
    "name": "bb_create_pull_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleYesPull request title.
toBranchYesTarget branch name (without refs/heads/).
reviewersNoExplicit reviewer usernames (on Cloud: usernames or '{uuid}' strings); overrides the required-reviewers service (Server/DC).
fromBranchYesSource branch name (without refs/heads/).
projectKeyYesProject key (target repository; on Cloud: workspace slug).
descriptionNoPull request description (markdown).
fromProjectKeyNoSource project key for fork PRs (default: projectKey).
repositorySlugYesTarget repository slug.
fromRepositorySlugNoSource repository slug for fork PRs (default: repositorySlug).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose meaningful behavior: it attempts the required-reviewers service first, treats 400/404 as non-fatal, proceeds anyway, and surfaces that reviewers must then be added manually. It does not cover permission/auth requirements, idempotency on duplicate PRs, or other failure modes, which keeps it short of a 5.

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

Conciseness4/5

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

Three short sentences with the core action front-loaded and the fallback behavior last. The fork sentence largely duplicates schema text, a minor redundancy, but nothing is bloated.

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 9-parameter mutation tool with no annotations and no output schema, the description covers the two non-obvious behaviors (fork sourcing and reviewer pre-fill fallback). It leaves gaps on what a successful call returns and on permission requirements, but the fully documented schema picks up most of the remaining load.

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 every parameter including fromProjectKey/fromRepositorySlug is already documented in the schema. The description restates the fork parameters but adds no new syntax, defaults, or edge-case meaning beyond what the schema provides; baseline 3 applies.

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 opens with a specific verb and resource ('Open a pull request') and adds the fork scope via fromProjectKey/fromRepositorySlug. The verb itself separates it from siblings like bb_merge_pull_request or bb_update_pull_request, but it never explicitly routes an agent away from those alternatives.

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 the creation step once source and target branches exist. There is no explicit when-to-use statement, no prerequisite guidance (e.g., branches must exist, permissions needed), and no mention of when to prefer bb_update_pull_request instead.

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