Cleanup Temp Sessions
cleanup_temp_sessionsClean up temporary session data by targeting one session, all sessions, or sessions older than a set age; removes temp SQLite tables and session records while preserving favorites and persistent data.
Instructions
Clean up temporary session data - can target specific session or clean all sessions.
๐งน UNIFIED CLEANUP TOOL - Handles both specific session cleanup and complete cleanup
Usage Modes:
Specific Session:
cleanup_temp_sessions(session_id="my_session")โ Clean specific session onlyAll Sessions:
cleanup_temp_sessions()โ Clean ALL existing sessions (default behavior)Age-based:
cleanup_temp_sessions(hours_old=48)โ Clean sessions older than 48 hoursCombined:
cleanup_temp_sessions(session_id="current", auto_cleanup_old=True)โ Clean current + all others
What Gets Cleaned:
All temporary SQLite tables: temp_recipes, temp_recipe_ingredients, temp_cnf_foods, temp_cnf_nutrients, temp_recipe_macros
Virtual session data from memory
Session tracking records
Safety Features:
Only cleans session-scoped data
Preserves user favorites and persistent data
Reports exactly what was cleaned
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": "cleanup_temp_sessions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hours_old | No | Optional hours of inactivity before auto-cleanup (None = clean all) | |
| session_id | No | Optional specific session to clean up | |
| auto_cleanup_old | No | Whether to also clean old sessions (default True) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||