Skip to main content
Glama

Clear caches

wp_clear_cache
Destructive

Flush the WordPress object cache, OPcache if available, and the whole page cache of the supported caching plugins present (LiteSpeed Cache, WP Super Cache, W3 Total Cache, WP Fastest Cache, SiteGround Speed Optimizer, Breeze, Nginx Helper, WP Rocket, Cache Enabler, WP-Optimize, Hummingbird). Suited to making a change visible that a cache still serves in its old form; expired transients are removed by wp_cleanup_transients. page_cache_purged lists the ones asked to purge; a cache none of them drives (host, CDN) is not reached. On a multisite network a plugin that can only empty every site at once runs only for a user who holds the network right that plugin asks for; page_cache_skipped names it and why. Returns object_cache_flushed, opcache_reset and page_cache_purged, plus page_cache_failed and page_cache_skipped where a purge failed or was left out. Only cached copies go: pages and queries are built afresh on their next request, so the site can answer slower for a short while. Requires manage_options; no undo point is recorded. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructive=true, but the description adds materially: only cached copies are dropped and pages rebuild on next request, the site may answer slower briefly, manage_options is required, no undo point is recorded, and multisite behavior depends on a network capability. It also documents partial-failure semantics via page_cache_failed and page_cache_skipped.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but front-loaded: what it flushes first, then the use case, then caveats and returns. A couple of clauses are packed (the multisite permission sentence), but nearly every sentence carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, yet the description enumerates return fields, permission requirements, multisite constraints, partial-failure cases, and the non-reversible nature of the operation. Nothing an agent needs in order to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so the baseline is 4. The description instead invests in return-value semantics (object_cache_flushed, opcache_reset, page_cache_purged, page_cache_failed, page_cache_skipped), which is useful since no output schema exists.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('flush') and the exact resources: object cache, OPcache, and page cache of eleven named caching plugins. It explicitly contrasts with wp_cleanup_transients, so an agent can separate the two cache-related siblings without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete trigger ('making a change visible that a cache still serves in its old form') and routes transient cleanup to wp_cleanup_transients. It also bounds scope by warning that host/CDN caches are not reached. It stops short of a full when-not-to-use rule, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources