Skip to main content
Glama
Knuckles-Team

Repository Manager

Worktree hygiene

repository_manager_worktree_hygiene

Audit session worktrees before releases, classify safe-to-prune versus do-not-disturb, and optionally remove only merged worktrees and dangling admin pointers.

Instructions

Audit (and optionally prune) session worktrees as a release-flow step.

Wraps :meth:WorktreeManager.audit. Read-only by default — it returns the safe_to_prune/do_not_disturb classification so a release run can report what could be cleaned without touching anything. With prune=True it removes only merged worktrees (and dangling admin pointers), never active/stale work or orphaned directories. This is the audit-aware cleanup the release pipeline runs instead of a blind reaper. (CONCEPT:RM-WORKTREE-AUDIT)

Input Schema

NameRequiredDescriptionDefault
baseNomain
pruneNo
stale_daysNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.5.1

TDQS

A4.3/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: default is read-only and returns safe_to_prune/do_not_disturb, while prune=True removes only merged worktrees and dangling admin pointers and never active/stale work or orphaned directories. This precisely scopes a non-readOnly tool whose destructive surface is otherwise easy to misjudge.

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 core action, then the read-only default, then the prune semantics — a sensible order with little waste. The parenthetical meth reference and the (CONCEPT:RM-WORKTREE-AUDIT) tag are minor filler.

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, the description needn't document return values, and it still clarifies the classification it emits. Annotations cover the safety profile. The remaining gap is the unexplained `base` and `stale_days` parameters, which a caller would have to infer.

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 0%, so the description must carry parameter meaning. It explains prune=True well and hints at the stale classification, but says nothing about `base` (default 'main') or `stale_days` (default 14), leaving two of three parameters undefined everywhere.

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+resource (audit and optionally prune session worktrees) and places it in a concrete workflow (a release-flow step). It also distinguishes itself from the blind reaper siblings, so an agent can tell it apart from rm_worktree_prune/rm_worktree_audit without opening those schemas.

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 clear when-to-use context: run as a release-flow audit step, and explicitly frames itself as the audit-aware alternative to a blind reaper. It never names the specific sibling tool an agent should avoid, so routing is implied rather than fully explicit.

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