Skip to main content
DELETE
/
wp-json
/
getmcp
/
v1
/
analytics
/
calls
/
filter
curl --request DELETE \
     --url https://yoursite.com/wp-json/getmcp/v1/analytics/calls/filter \
     --header 'Authorization: Bearer gmcp_your_api_key' \
     --header 'content-type: application/json' \
     --data '{
       "server_id": "836995ae-1cff-41ec-823e-a4f07ccca3a0",
       "status": "error",
       "from": "2025-03-01",
       "to": "2025-03-15"
     }'
{
  "deleted": 487
}
Deletes call-log rows that match the same filter shape used by GET /analytics/calls. The endpoint reuses the read-side filter builder, so anything you can list you can delete. Typical use cases:
  • Clear errors from a misbehaving tool while keeping success logs intact.
  • Wipe a date window after running a load test against a production server.
  • Drop the noisy admin_test client logs after a debugging session.
The endpoint requires at least one real filter. A DELETE with no filters returns 400 so you can’t accidentally wipe the entire table — use the Settings page if that’s actually the intent.
Permission is gated on the WordPress core capability manage_options. Users with the lighter getmcp_view_analytics capability can read call logs but cannot delete them.

Query/Body Parameters

Filters can be passed either as query string params or in a JSON body — pick whichever is convenient. The filter set matches GET /analytics/calls.
Substring matched against server.name, tool.name, method, client_type, client_ip, error_message.
server_id
string
Filter by server UUID. Anything that doesn’t resolve to a known server is ignored.
status
string
Filter by response_status. One of: success, error.
from
string
Lower bound on created_at (YYYY-MM-DD, WP timezone, inclusive of start-of-day).
to
string
Upper bound on created_at (YYYY-MM-DD, WP timezone, inclusive of end-of-day).
method_group
string
Filter by JSON-RPC method family. One of: tools, prompts, resources.
min_response_time_ms
integer
Only delete rows where response_time_ms >= N. Useful for purging slow outliers.
curl --request DELETE \
     --url https://yoursite.com/wp-json/getmcp/v1/analytics/calls/filter \
     --header 'Authorization: Bearer gmcp_your_api_key' \
     --header 'content-type: application/json' \
     --data '{
       "server_id": "836995ae-1cff-41ec-823e-a4f07ccca3a0",
       "status": "error",
       "from": "2025-03-01",
       "to": "2025-03-15"
     }'
{
  "deleted": 487
}

Response Fields

deleted
integer
Number of rows removed by the DELETE query. 0 is a valid response when the filter matched nothing.