Skip to main content
Glama

git_cleanup_branches

Safely identify and delete local Git branches already merged into master or main while protecting active and primary branches; preview changes by default.

Instructions

Nettoie et supprime de façon sécurisée les branches locales déjà mergées dans master/main (protège les branches actives et principales, dry_run=true par défaut)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo_path": "<repo_path>"
    },
    "name": "git_cleanup_branches"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoSi true (défaut), prévisualise les branches supprimables sans les effacer
repo_pathYesChemin du dépôt Git
base_branchNoBranche de référence de merge ('master' ou 'main'). Détectée automatiquement si omise

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses that deletion is scoped to already-merged local branches, that active/main branches are protected, and that dry_run is on by default — but it says nothing about remote branches, force-deletion behavior, whether a clean working tree is required, or whether the deletion is recoverable.

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?

A single dense sentence with the action front-loaded and the safety constraints in a parenthetical, so there is no wasted wording. The parenthetical does pack three distinct ideas together, which slightly reduces scannability but not enough to penalize heavily.

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

Completeness3/5

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

For a destructive git operation with no annotations and no output schema, the description covers what is deleted and what is protected but omits the result shape an agent would want (does dry_run return a list of candidate branches?) and any preconditions such as repository state. Adequate but with clear gaps for a mutation tool.

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 are already documented in the schema, making 3 the baseline. The description only restates the dry_run default and the master/main reference branch, adding no new syntax, format, or edge-case meaning beyond what the schema provides.

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 names a specific verb and resource ('Nettoie et supprime ... les branches locales déjà mergées dans master/main'), which tells an agent exactly what is targeted and under what condition (already merged). It does not explicitly differentiate itself from any sibling, though none of the listed siblings overlap in function, so the gap is minor.

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?

The definition gives clear operating context: it only touches local branches already merged into master/main, it protects active and main branches, and dry_run defaults to true so the safe preview path is the default. There are no stated alternatives to route to or explicit when-not-to-use cases, which keeps it short of a 5.

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