Clear Caches


Clears WordPress's object cache and asks any detected page-caching plugin to clear its cache too. Safe and repeatable. Use it when a change has been saved but visitors still see the old version. The answer names each cache it cleared and each one it could not, rather than claiming success for all of them.

Also known as: clear cache, clear the caches, flush cache, purge cache, empty the cache.

Property Value
Ability slug mosmcp/site-flush-cache
Wire tool name mosmcp__site-flush-cache
Category Maintenance (mosmcp-maintenance)
Plan Free

 

Required access

Requirement Value
Capability manage_options
Minimum default role Administrator
Annotations readOnly: false · destructive: false · idempotent: true · openWorld: false

 

Input schema

Takes no input. Send "input": {} (or omit input).

 

Output schema

Field Type Required Description
object_cache_flushed boolean Yes
persistent_object_cache boolean Whether a persistent object cache was in use. When false, the object cache only ever held this one request.
engines object[] Yes Page-caching plugins detected on this site.
engines[].name string
engines[].cleared boolean
engines[].detail string Why it could not be cleared, when it could not.
notes string[]

 

Example

Sample prompt
I updated my homepage but visitors still see the old version, please clear the cache.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 242,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__site-flush-cache",
    "arguments": {
      "input": {}
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 242,
  "result": {
    "isError": false,
    "structuredContent": {
      "object_cache_flushed": true,
      "persistent_object_cache": false,
      "engines": [
        {
          "name": "WP Rocket",
          "cleared": true,
          "detail": ""
        },
        {
          "name": "Elementor generated CSS",
          "cleared": true,
          "detail": ""
        }
      ],
      "notes": [
        "This site has no persistent object cache, so the object cache only ever held data for a single request and clearing it changes nothing visible."
      ]
    }
  }
}

 

Edge cases / errors

  • Only detected engines are cleared (WP Rocket, LiteSpeed, WP Super Cache, W3 Total Cache, Breeze, SiteGround Optimizer, Elementor CSS); each reports cleared on its own, with the error in detail if one failed.
  • No page-cache plugin found → a note that stale pages are probably cached at the host or CDN, which this can't clear.
  • Safe to repeat.

 


<< Previous Next >>
Get WordPress Version List Scheduled Events

For more information about the Secure MCP Server for WordPress plugin, explore the following resources:

Product Overview | Pricing | Try for Free | Documentation

If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.