Skip to main content
Glama
GitHub PR Issue Analyser

GitHub PR Issue Analyser

by saidsef

Github Delete Branch

github_delete_branch
Destructive

Deletes a repository branch while refusing default branches and open pull request sources unless forced, preventing accidental pull request closure.

Instructions

Deletes a branch. The default branch is always refused. A branch an open pull request comes from is refused unless force is set, because deleting it closes that pull request. See #536.

Workflow and conventions: github_get_skill('pr-management').

Input Schema

NameRequiredDescriptionDefault
forceNoDelete the branch even though an open pull request comes from it
branchYes
repo_nameYes
repo_ownerYes
expected_head_shaNoRefuse unless the head still matches this SHA

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv55.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description adds genuinely new behavior: which branches are guarded, and the consequence of force (deleting a PR's source branch closes that PR). Deduction for the unexplained dangling reference "See #536", which conveys nothing to an agent without tracker access.

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 and tight: the action, the two safety rules, the force consequence, then the workflow pointer. The "See #536" fragment is the only sentence that doesn't earn its place.

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, single-purpose delete tool with an output schema and rich annotations, this covers what an agent actually needs: refusal conditions, the force trade-off, a concurrency guard param, and where to find conventions. Nothing material about correct invocation is missing.

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 only 40% across 5 params, so the description should carry more weight; it explains force in behavioral terms (closes the open PR) but says nothing about expected_head_sha's conditional-refusal role, leaving that to the schema's own one-liner. The three required params (owner/name/branch) are self-evident and need no elaboration.

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?

Opens with a specific verb and resource ("Deletes a branch") and immediately scopes it with two refusal rules, so the agent knows exactly which branches are eligible. No sibling tool does branch deletion, so no further differentiation is needed.

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 when-not conditions (default branch always refused; branch with an open PR refused unless force) plus a pointer to github_get_skill('pr-management') for workflow/conventions. It stops short of naming an alternative tool for the cases where deletion is refused, leaving the agent to infer the fallback.

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

Deploy Server

Other Tools