Skip to main content
Glama
bitbucket-mcp

bitbucket-mcp

by nevzatcirak

Decline pull request

bb_decline_pull_request

Decline a pull request by project, repository, and PR ID. Include an optional rejection reason on Server/DC; on Cloud, post a comment to record why.

Instructions

Decline (reject) a pull request. Server/DC: optional message, version taken from the current payload. Cloud: decline accepts no message — post a comment if a reason should be recorded.

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

Input Schema

NameRequiredDescriptionDefault
messageNoReason for declining (Server/DC only).
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.2/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 behavioral burden. It does disclose two non-obvious traits — Cloud drops the message argument, and the version comes from the current payload (a concurrency/optimistic-locking behavior) — but says nothing about required permissions, whether the PR must be open, or that declining is reversible via reopen.

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 tight sentences, front-loaded with the core action, then the platform fork. Every clause carries information; nothing is padded or redundant with the title.

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 4-parameter mutation tool with no annotations and no output schema, the platform-divergent argument handling is the key complexity and it is covered. Minor gaps remain around preconditions (PR state) and permission requirements.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning: `message` is only accepted on Server/DC and on Cloud the reason must be recorded via a separate comment tool. That is platform-specific handling not fully conveyed by the schema's brief '(Server/DC only)' note.

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?

States a specific verb and resource ('Decline (reject) a pull request'), which is unambiguous against mutation siblings like bb_merge_pull_request or bb_reopen_pull_request. An agent can identify the operation without opening the schema.

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?

Gives a concrete conditional rule: on Cloud, declining takes no message, so route the reason through a comment instead — implicitly pointing at bb_post_pull_request_comment. It lacks explicit when-to-use vs. merge/reopen guidance, but the platform split is a real selection rule.

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