Skip to content

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_type (‘incident’ | ‘change’ | ‘repo’ | ‘all’). 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.

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_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.

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_type": {
"description": "Limit prune to one pack directory. Default 'all' scans incident + change + repo.",
"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"
}
}
}

Every tool returns the standard envelope — tier_used, model, tokens_in/tokens_out, elapsed_ms, backend provenance, warnings. See Envelope & tiers.

Schema + handler: src/tools/artifactPrune.ts · registration: src/index.ts


Back to the Tool Reference.