Skip to main content
Glama
pdogra1299
by pdogra1299

delete_branch

Delete a Git branch in a Bitbucket repository by workspace, repository, and branch name. Pass expected_head (commit SHA) to skip the head lookup and avoid deleting a moved branch.

Instructions

Delete a branch. Pass expected_head (commit SHA) to skip the lookup call (Server).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesProject key (e.g., PROJ)
repositoryYesRepository slug
branch_nameYes
expected_headNoKnown head SHA (compare-and-swap)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv3.0.1
    • removedInput schema / properties / branch_name / description
      Removed value: -"Branch name to delete"
    • addedInput schema / properties / expected_head
      Added value: +{
      +  "description": "Known head SHA (compare-and-swap)",
      +  "type": "string"
      +}
    • removedInput schema / properties / force
      Removed value: -{
      -  "description": "Force delete even if branch is not merged (optional, default: false)",
      -  "type": "boolean"
      -}
    • changedInput schema / properties / repository / description
      Previous value: -"Repository slug (e.g., \"my-repo\")"New value: +"Repository slug"
    • changedInput schema / properties / workspace / description
      Previous value: -"Bitbucket workspace/project key (e.g., \"PROJ\")"New value: +"Project key (e.g., PROJ)"
  2. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries full behavioral disclosure burden. It notes that expected_head skips a server lookup, which is useful context. However, it does not state that deleting a branch is destructive, irreversible, or permission-sensitive, nor what happens on a SHA mismatch.

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 short sentences, front-loaded with the core action and immediately followed by the most useful optional-parameter hint. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive mutation with no annotations and no output schema, the definition is too thin. It omits permissions, irreversibility, side effects, error behavior when expected_head mismatches, and any return information an agent might need.

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 coverage is 75%, so the schema already documents workspace, repository, and expected_head. The description adds meaning for expected_head by explaining that passing it avoids a lookup call. It does nothing for branch_name, which lacks a schema description.

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: 'Delete a branch.' That is clear and unambiguous. It does not explicitly distinguish itself from siblings like get_branch or list_branches, though the verb makes the distinction obvious.

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

Usage Guidelines2/5

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

The only guidance given is a performance tip for expected_head: pass it to skip a lookup call. There is no indication of when to use this tool versus alternatives, no prerequisites, and no exclusions or warnings about branch deletion.

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