Skip to main content
Glama

Stale branches

stale_branches
Read-onlyIdempotent

Find old Git branches for cleanup by listing those with commits at least N days old, oldest first, and showing which are already merged into HEAD.

Instructions

List branches whose latest commit is at least N days old, oldest first, and whether each is already merged into HEAD.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoSize of the time window in days.
repoNoRepository name or absolute path from the allowlist. Defaults to the first configured repo.
limitNoMaximum number of results (1-200).
mergedOnlyNoOnly list branches already merged into HEAD, i.e. safe cleanup candidates.
includeRemoteNoAlso include remote-tracking branches.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesName of the repository that was queried.
branchesYes
staleCountYes
thresholdDaysYes
totalBranchesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds genuinely useful behavioral context absent from annotations: deterministic ordering (oldest first) and that merge status relative to HEAD is returned per branch.

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?

A single tight sentence that is fully front-loaded with the verb and resource, then qualifiers. No filler or redundant restatement of the title.

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

Completeness4/5

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

With an output schema present and full schema coverage plus annotations, the description carries little extra burden and covers the core behavior. It stops just short of explaining filtering interplay (e.g. how mergedOnly and days combine), but nothing essential is missing for correct invocation.

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 five parameters are already documented in the schema. The description loosely echoes 'N days' and 'merged into HEAD' (days, mergedOnly) but adds no format, default, or range detail beyond what the schema provides. Baseline 3 applies.

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 (List) and resource (branches) with a precise scope: latest commit at least N days old, ordered oldest first, with per-branch merge status. This is clearly distinguishable from siblings like recent_activity or compare_refs, which do not deal with branch staleness.

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

Usage Guidelines3/5

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

The 'oldest first' ordering and merged-into-HEAD detail imply a cleanup/pruning use case, but the description never states when to use this versus alternatives (e.g. compare_refs, recent_activity) or any exclusions. Usage is implied rather than stated.

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