Skip to main content
Glama

gluecron_delete_branch

DestructiveIdempotent

Delete a branch the way git push --delete would: write access, then branch protection (allow_deletion), rulesets and the push inspection apply; webhooks and CI fire. The default branch is never deleted. Pass expected_sha to delete only if the branch still points there. A missing branch is a not-found error. Mirrors DELETE /api/v3/repos/:o/:r/git/refs/heads/:branch. Audit-logged. Returns {branch, sha, deleted: true}.

Input Schema

NameRequiredDescriptionDefault
repoYesRepo name
ownerYesRepo owner — username or organisation slug
branchYesBranch name, without refs/heads/
expected_shaNoDelete only if the branch still points here (compare-and-swap); otherwise a conflict

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, it discloses permissions required (write access), protections that apply (allow_deletion, rulesets, push inspection), side effects (webhooks and CI fire), audit logging, error behavior, and the exact return payload.

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?

Front-loads the core action and the default-branch safety rule, with each sentence adding a distinct behavioral fact. It is dense but nearly every clause earns its place; the API endpoint mirror is the only borderline redundant element.

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

Completeness5/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 output schema, the description covers permissions, protection interactions, side effects, failure modes, idempotency semantics, and return shape—everything an agent needs to invoke it safely.

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 100%, so owner/repo/branch/expected_sha are already documented. The description restates the expected_sha compare-and-swap behavior and branch-name convention but adds little beyond what the schema already conveys, matching the baseline for high coverage.

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 (delete a branch) and anchors it to a familiar behavior (`git push --delete`). It is unambiguously distinct from siblings like create_branch, delete_repo, or delete_file.

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 clear conditions: the default branch is never deleted, expected_sha enables conditional deletion, and a missing branch yields not-found. It does not explicitly route to alternatives (e.g., create_branch), but the operational context is well covered.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources