Maintenance and cleanup operations
maintenanceRun cleanup operations to remove expired Files API entries, clean old local files, check storage quota, and fix database inconsistencies. Preview changes with dry-run before applying.
Instructions
Perform maintenance operations following workflows.md patterns.
Available operations:
cleanup_expired: Remove expired Files API entries from database
cleanup_local: Clean old local files based on age/LRU
check_quota: Check Files API storage usage vs. ~20GB budget
database_hygiene: Clean up database inconsistencies
full_cleanup: Run all cleanup operations in sequence
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"operation": "<operation>"
},
"name": "maintenance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | If true, only report what would be done without making changes | |
| operation | Yes | Maintenance operation to perform: 'cleanup_expired', 'cleanup_local', 'check_quota', 'database_hygiene', 'full_cleanup' | |
| keep_count | No | For local cleanup: minimum number of recent files to keep | |
| max_age_hours | No | For local cleanup: maximum age in hours (default: 168 = 1 week) |