Skip to main content
POST
Forces the log-retention cleanup to run immediately instead of waiting for the daily cron. Deletes call logs, daily-aggregated analytics rows, and stale MCP sessions older than the thresholds defined in plugin settings.
Useful right after lowering log_retention_days or analytics_retention_days on a busy site — without this, the freed-up rows would only be reclaimed at the next cron tick. Be aware that on huge tables the delete pass can run for several seconds; the request blocks until the cleanup completes.
Permission is gated on the WordPress core capability manage_options (not the plugin’s getmcp_manage_settings). This is intentional — the operation can be slow on large tables, so it stays restricted to site administrators.

Body

No body. Send an empty POST.

Response Fields

object
Per-table count of rows removed by this run.
integer
Call-log rows deleted (older than log_retention_days).
integer
Aggregated daily-analytics rows deleted (older than analytics_retention_days).
integer
Stale MCP session rows reclaimed.
object
The retention thresholds in effect at the time of the run, mirroring the matching keys on the Settings endpoint.