worktree_gc
Reclaim rebuildable build-cache entries project-wide or across all repos. Runs a dry-run report by default and quarantines deletions for reversible cleanup.
Instructions
Reclaim rebuildable build-cache entries (project-wise or --all). Default is a dry-run report. Mutations require confirm=true; deletions are quarantine-only (reversible via undo). Filters: tool, older_than, newer_than, min_size, max_size, tier, include, exclude, keep_latest, project, all, undo, journal_id, purge.
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": "worktree_gc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Scan all repos, not just this one | |
| json | No | Return JSON instead of text | |
| tier | No | Candidate tier (default both) | |
| tool | No | Restrict to these tools (e.g. pnpm, cargo) | |
| undo | No | Preview restoring a quarantine journal id; confirm=true restores it, reversing an apply | |
| purge | No | Permanently delete quarantined entries older than 14d (requires confirm=true) | |
| confirm | No | true applies/quarantines/restores/purges; false or omitted is a dry-run report | |
| exclude | No | Glob patterns to exclude | |
| include | No | Glob patterns to include | |
| project | No | Vault project slug to scope to | |
| max_size | No | Only entries at most this size (e.g. 2G) | |
| min_size | No | Only entries at least this size (e.g. 1M) | |
| worktree | No | Worktree path to scope to (default: cwd) | |
| journal_id | No | Restrict purge to this quarantine journal id; must be a nonempty safe id | |
| newer_than | No | Only entries newer than this (e.g. 7d) | |
| older_than | No | Only entries older than this (e.g. 30d, 12h, 2w) | |
| keep_latest | No | Always keep the N newest entries per tool | |
| workspace_path | No | Absolute thread workspace directory; must map to this project. Omit only when the server cwd is the thread workspace. |