Skip to main content
Glama

git_worktree_clean

Delete build artifacts, caches, or temp files in a specific Git worktree only, avoiding impact on other worktrees. Use for safe, targeted cleanup.

Instructions

Clean scratch files in a specific hop (git worktree) only. Deletes build artifacts, caches, or temp files without affecting other worktrees. Safer than global clean.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugNoCombined with ticket to identify specific worktree.
globsNoGlob patterns for files to delete (e.g., ["dist/**", "node_modules/**"]).
branchNoBranch name to find the worktree to clean.
ticketNoTicket ID to find the worktree to clean.
repoPathNoAny path inside the git repository.
maxMatchesNoSafety limit on number of files to delete.
worktreePathNoDirect path to the worktree to clean.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses that it deletes files and that the scope is limited to one worktree, and mentions maxMatches exists in the schema as a safety limit. But it omits whether deletion is destructive/irreversible, permissions required, or what happens on glob mismatch — significant gaps for a destructive operation with zero annotation coverage.

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?

Three short sentences with no waste. Purpose and scope are front-loaded, followed by the safety contrast. Every sentence earns its place.

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?

This is a destructive file-deletion tool with 7 parameters, no annotations, and no output schema. The description should clarify safety semantics (irreversibility, dry-run behavior, what maxMatches does), but instead gives only high-level scope. Inadequate for the complexity and risk level.

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 documents all 7 parameters with detail (globs examples, worktree identification methods). The description doesn't add parameter-level meaning beyond noting the scoped nature. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb (cleans/deletes) and resource (scratch files in a git worktree), and clarifies scope ('a specific hop only'). It implicitly contrasts with a global clean, but doesn't name the sibling (e.g., hop_clean) explicitly the way a 5 would.

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?

Implies when to use via 'Safer than global clean' and 'without affecting other worktrees', suggesting a scoped-use preference. However, it never names the alternative tool (hop_clean) or states when NOT to use this tool. Guidance is implied, not explicit.

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