MCP housekeeping sweep (POST)
const url = 'https://example.com/api/cron/mcp-retention-sweep';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/cron/mcp-retention-sweepScheduled with ticket-email-digest (every 15m) via the mcp-retention
stage in .slipstream.json (scripts/cron-mcp-retention-sweep.sh).
Protected by CRON_SECRET via the x-cron-secret header only.
Responses
Section titled “ Responses ”Per-sweep deleted / swept counters
object
False when the sweep threw; error then carries a short reason.
Rows deleted from mcp_tool_calls past the 30-day retention window.
Stale mcp_session_machines presence rows deleted.
Expired per-session project defaults dropped (machine-local).
Abandoned in-flight work entries dropped (machine-local).
Stale agent sessions dropped from the in-process map (machine-local).
Stale agent-worker sessions pruned (machine-local).
Expired presence write-throttle entries dropped (machine-local).
Work segments flushed to the database during the sweep.
Short failure reason; present only when ok is false.
Missing or invalid CRON_SECRET