Skip to main content
Glama

merjax_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 destructiveHint/idempotentHint, it discloses that write access is required, that branch protection (allow_deletion), rulesets and push inspection gate the call, that webhooks and CI fire as side effects, that the default branch is protected, that the operation is audit-logged, and the exact error semantics for a stale SHA or a missing branch.

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-loaded with the action and the mechanism, then preconditions, then return shape. Very dense and nearly every clause carries new information; the git-analogy clause is the only mildly redundant framing since the endpoint mirror is given later.

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, no-output-schema mutation, it covers the permission gate, protection/ruleset checks, side effects, protected-target exclusion, failure modes and the literal return value, so an agent can call it and anticipate the outcome without further sources.

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 the baseline is 3. The description's note on expected_sha (delete only if the branch still points there) largely restates what the schema already says, including the conflict behaviour, and it adds no format or constraint detail for owner/repo/branch.

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 immediately scopes it with the `git push --delete` analogy plus the endpoint it mirrors. That distinguishes it from adjacent siblings such as merjax_create_branch, merjax_delete_repo and merjax_purge_repo without opening any 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 concrete usage conditions: it is the git-push-delete path with write access, protection and rulesets applying; the default branch is never deleted; pass expected_sha for compare-and-swap; a missing branch is not-found. It stops short of naming competing tools (e.g. why not delete_repo/purge_repo) but the preconditions make selection unambiguous in practice.

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