Skip to main content
Glama
bitbucket-mcp

bitbucket-mcp

by nevzatcirak

Reopen pull request

bb_reopen_pull_request

Reopens a declined pull request by ID and retries once on version conflicts using optimistic locking.

Instructions

Reopen a declined pull request. Uses optimistic locking: re-fetches the current version and retries once on a 409 conflict.

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_reopen_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

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and usefully discloses optimistic locking, re-fetching, and a single retry on 409 conflict. It does not describe permission requirements or what happens when the pull request is not in a declined state.

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?

The description is two sentences, front-loads the action and precondition, and includes the conflict behavior without unnecessary wording.

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 simple reopen mutation with a fully documented schema and no output schema, the description covers the key precondition and conflict-handling behavior. It leaves some mutation details unstated, such as permission requirements and behavior when the pull request is not declined.

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 input schema already documents all three parameters. The description adds no parameter-specific meaning beyond the schema.

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?

The description states a specific verb and resource: reopen a declined pull request. The declined precondition also distinguishes it from general update or merge operations.

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?

The description implies when to use it by specifying that the pull request must be declined. It does not explicitly name alternatives or state when not to use this tool.

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