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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "git_worktree_clean"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | Combined with ticket to identify specific worktree. | |
| globs | No | Glob patterns for files to delete (e.g., ["dist/**", "node_modules/**"]). | |
| branch | No | Branch name to find the worktree to clean. | |
| ticket | No | Ticket ID to find the worktree to clean. | |
| repoPath | No | Any path inside the git repository. | |
| maxMatches | No | Safety limit on number of files to delete. | |
| worktreePath | No | Direct path to the worktree to clean. |