Skip to main content
Glama

branch_hygiene

Read-onlyIdempotent

Identifies stale, unmerged, or abandoned branches with ahead/behind counts, last commit date, and author to help clean up your repository.

Instructions

Read-only. Inventory of branches with ahead/behind counts versus the default branch, last commit date and author, merged status, and a stale flag (no commits in stale_days days). Use it to find unmerged, abandoned branches. The default branch itself is excluded from the list. Pure local git; no network. Returns { count, branches, default_branch_excluded }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoPath inside the target git repo. Defaults to the server's current working directory.
remoteNoInspect remote (`origin`) branches instead of local branches. Default false.
stale_daysNoA branch with no commit newer than this many days is flagged `stale`. Default 30.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNo
branchesNo
default_branch_excludedNo
Behavior4/5

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

Annotations already set readOnlyHint=true, idempotentHint=true, destructiveHint=false. Description adds that it's 'Pure local git; no network' and that 'The default branch itself is excluded from the list.' It also outlines the return structure. No contradiction with annotations.

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?

Four sentences with no wasted words. The first sentence immediately conveys read-only nature and the key fields. Return format is given. Every sentence serves a purpose.

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?

Despite having 3 optional params and an output schema (implied by the return structure described), the description covers the key behavioral aspects: what it returns, default branch exclusion, network independence, and the stale flag logic. No gaps for an agent to invoke correctly.

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 schema already documents all three parameters. The description does not add significant extra meaning beyond what is in the schema descriptions (e.g., default for stale_days). Baseline of 3 is appropriate.

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?

Description clearly states the tool provides an inventory of branches with ahead/behind counts, last commit date, author, merged status, and stale flag. It explicitly says 'Use it to find unmerged, abandoned branches,' which is a specific use case. The name 'branch_hygiene' is metaphorical but the description makes it concrete. Sibling tools like co_change or commit_context focus on different aspects, so this tool is well-differentiated.

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?

Description gives explicit guidance: 'Use it to find unmerged, abandoned branches.' It also states it's read-only and pure local git with no network. It does not explicitly mention when not to use or provide alternatives, but the context is clear enough for an agent to decide.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HasanJahidul/git-insight-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server