ollama_artifact_prune
Prune artifacts (deletes). OPS. Clean up ~/.ollama-intern/artifacts/. No model call. DRY-RUN BY DEFAULT — pass dry_run: false to actually delete. Filter by older_than_days (file mtime) and/or pack (‘incident_pack’ | ‘repo_pack’ | ‘change_pack’ | ‘all’) — the same spelling artifact_list / artifact_read / artifact_diff use, so an identity round-trips. The pre-v2.9.2 pack_type (‘incident’ | ‘change’ | ‘repo’) is still accepted so an existing filter is never silently widened to every pack. Deletes matched files in .md + .json pairs. Returns {matched:[{pack, slug, age_days, bytes}], total_matched, total_bytes, dry_run, deleted, artifact_root}. Use this when disk is creeping or the artifact dir has stale handoffs you don’t need.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
older_than_days |
integer | no | — | Only match artifacts older than N days (by file mtime). Omit for no age filter. |
pack |
"incident_pack" \ |
"repo_pack" \ |
"change_pack" \ |
"all" |
pack_type |
"incident" \ |
"change" \ |
"repo" \ |
"all" |
dry_run |
boolean | no | — | Report what would be deleted without touching disk. DEFAULTS TO true — pass false to actually delete. |
Full input schema
Section titled “Full input schema”The JSON Schema below is generated from the same zod schema the server validates against at the wire — it cannot drift from runtime behavior.
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "older_than_days": { "description": "Only match artifacts older than N days (by file mtime). Omit for no age filter.", "type": "integer", "minimum": 0, "maximum": 3650 }, "pack": { "description": "Limit prune to a single pack — same field name and same values as artifact_list / artifact_read / artifact_diff, so an identity round-trips between them. Omit (or pass 'all') to scan every pack.", "type": "string", "enum": [ "incident_pack", "repo_pack", "change_pack", "all" ] }, "pack_type": { "description": "DEPRECATED — use `pack`. The pre-v2.9.2 short spelling ('incident' | 'change' | 'repo' | 'all'), still honored so existing callers are not silently widened to every pack. `pack` wins if both are supplied.", "type": "string", "enum": [ "incident", "change", "repo", "all" ] }, "dry_run": { "description": "Report what would be deleted without touching disk. DEFAULTS TO true — pass false to actually delete.", "type": "boolean" } }}Envelope
Section titled “Envelope”Every tool returns the standard envelope — tier_used, model, tokens_in/tokens_out, elapsed_ms, backend provenance, warnings. See Envelope & tiers.
Source
Section titled “Source”Schema + handler: src/tools/artifactPrune.ts · registration: src/index.ts
Back to the Tool Reference.