prune_models
Bulk-delete old Ollama models while preserving specified IDs, the default model, loaded models, and recent ones. Use dry_run=true to preview candidates before deleting.
Instructions
Bulk-delete old models from an ollama provider. dry_run=true (default) only reports candidates. Always keeps: keep[] ids, the provider default_model, currently-loaded models, and the keep_recent most recently modified others. With dry_run=false, deletes the rest.
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": "prune_models"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keep | No | Model ids to never delete | |
| dry_run | No | ||
| provider | No | ||
| keep_recent | No | Also keep this many most-recently-modified models (default 0) | |
| unused_days | No | Keep models with a recorded inference within N days (uses the model-usage ledger; models with no record are kept) | |
| max_age_days | No | Keep models modified within the last N days |