Skip to main content
Glama
garc33

Bitbucket Server MCP

by garc33

delete_branch

Delete a branch from a Bitbucket repository. Cannot delete the default branch. Use this for cleanup after merging pull requests or removing stale feature branches.

Instructions

Delete a branch from a Bitbucket repository. Cannot delete the default branch. Use this for cleanup after merging pull requests or removing stale feature branches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchYesBranch name to delete (e.g., "feature/old-feature", "bugfix/resolved-issue").
projectNoBitbucket project key. If omitted, uses BITBUCKET_DEFAULT_PROJECT environment variable.
repositoryYesRepository slug containing the branch.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the key restriction (default branch cannot be deleted), which is genuine behavioral value, but says nothing about permission requirements, irreversibility, whether the remote branch is affected, or how failures are reported for a destructive operation.

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?

Three short sentences, front-loaded with the action, then the hard constraint, then the usage context. No filler or redundancy; every sentence earns its place.

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?

Covers purpose, the critical constraint, and usage context for a 3-parameter mutation with no annotations. Because there is no output schema, it could have stated what a successful delete returns or how a rejected default-branch delete surfaces, which is the remaining 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 all three parameters (branch, project, repository) are already documented, including the BITBUCKET_DEFAULT_PROJECT fallback. The description adds no format or semantic detail beyond the schema, so the baseline of 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?

States a specific verb (delete) and resource (branch) scoped to a Bitbucket repository, and immediately narrows it with the constraint that the default branch cannot be deleted. An agent can distinguish this from the read-side siblings (list_branches, browse_repository) 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?

Explicitly names when to use it: cleanup after merging pull requests or removing stale feature branches. There is no explicit when-not guidance beyond the default-branch restriction and no named alternative, but the intended context is unambiguous.

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