Skip to main content
Glama
Knuckles-Team

Repository Manager

Audit

rm_worktree_audit
Read-onlyIdempotent

Audit git worktrees to classify active, stale, merged, or dangling lanes; optionally remove merged worktrees and prune dangling admin pointers for clean multi-session repos.

Instructions

Audit (rm_worktree). Manage git worktrees for concurrent multi-session development (CONCEPT:RM-WORKTREE).

Each session works a repo in its own worktree on its own branch under <WORKTREE_ROOT>/<repo>/<branch> (shared .git, no re-clone), leaving the canonical checkout on its default branch so a working-tree reset never disturbs in-flight session work.

Input Schema

NameRequiredDescriptionDefault
baseNoBase branch to fork from / sync against.main
intoNoTarget branch for 'merge', or the reset target for 'reset_branch'.main
pathNoWorkspace root override.
repoNoRepo basename (e.g. 'epistemic-graph') or absolute path. Omit for 'list'/'prune' across all repos.
adoptNoFor 'add': move the canonical checkout's uncommitted WIP onto the new branch via a private ref (never the shared refs/stash stack).
forceNoFor 'remove': override git's own dirty-tree refusal once lane occupancy has already cleared (never bypasses occupancy itself, D-CDX-15).
reposNoFor 'bulk_add': comma-separated repo basenames (default: every workspace repo).
branchNoWorktree branch name (each session uses a distinct branch).
strategyNoFor 'sync': 'rebase' or 'merge'.rebase
stale_daysNoFor 'audit': an unmerged worktree quiet for longer than this many days is classified 'stale' (review) rather than 'active'.
prune_mergedNoFor 'audit': DESTRUCTIVE. After classifying, remove every 'merged' worktree (and delete its branch) plus prune 'dangling' admin pointers. Never touches 'active'/'stale' work or orphaned directories.
delete_branchNoFor 'remove': also delete the branch.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.5.1

TDQS

C2.3/5.0
Behavior2/5

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

Annotations declare readOnlyHint=true, destructiveHint=false and idempotentHint=true, but the tool exposes 'prune_merged', which the schema explicitly labels DESTRUCTIVE and which removes worktrees, deletes branches, and prunes admin pointers — directly at odds with the read-only safety profile. The description body adds useful architectural context (shared .git, no re-clone, canonical checkout left on the default branch so resets don't disturb sessions), but it never states the classification behavior of audit itself or the destructive escalation path.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is only two sentences and reasonably sized, but it is not front-loaded on the tool's function — it opens with a tautological 'Audit (rm_worktree)' and spends its budget on generic subsystem background rather than tool-specific facts. Efficient in volume, poorly targeted in content.

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

Completeness2/5

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

For a 12-parameter tool with an output schema and a destructive escalation flag, the description never explains the audit action itself (what gets classified, what the report contains, what prune_merged does) nor how it relates to rm_worktree_list/prune. Since an output schema exists, return values needn't be described, but the gap around purpose and the destructive path is significant.

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 the schema already documents all 12 parameters (including per-action scoping like 'For audit:', 'For remove:', 'For bulk_add:'), which sets the baseline at 3. The description body contributes no additional parameter meaning beyond the schema, so no credit above baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Audit (rm_worktree)" simply restates the name and title, and the remaining sentences describe the worktree subsystem in general (shared .git, per-session branches) rather than what the audit action actually does — e.g. that it classifies worktrees as active/stale/merged/dangling. The distinctive behavior only leaks out through the 'stale_days' and 'prune_merged' parameter text, not the description body. An agent cannot tell from this text how 'audit' differs from siblings like rm_worktree_list, rm_worktree_prune, or repository_manager_worktree_hygiene.

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

Usage Guidelines2/5

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

There is no when-to-use, when-not-to-use, or which-sibling guidance anywhere in the description; the closest thing is the per-parameter 'For audit:' clauses buried in the schema. Given the dense family of worktree tools (add, bulk_add, list, merge, prune, remove, reset_branch, sync), the absence of routing guidance is a real gap. Usage is only implied by the parameter text.

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