Skip to main content
Glama

Cloudflare: Purge cache

cloudflare_purge_cache
Destructive

Purge Cloudflare cached content for a zone by clearing everything, specific URLs, cache tags, or URL prefixes so updated content is served on the next request.

Instructions

[UNIFIED] Purge cached content for a zone. Requires the token's Cache Purge permission. Provide exactly one strategy: purge_everything (all cached content), files (specific URLs), tags (cache tags), or prefixes (URL prefixes). Impact is temporary — cache rebuilds on next requests.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>",
      "zone_id": "<zone_id>"
    },
    "name": "cloudflare_purge_cache"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYes
tagsNo
filesNo
zone_idYes
prefixesNo
purge_everythingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description adds real value on top: the token needs Cache Purge permission, and the impact is temporary because the cache rebuilds on next requests. That self-healing caveat is exactly the kind of context annotations cannot convey. It omits whether the call is rate-limited or how long propagation takes.

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

Conciseness5/5

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

Three tight sentences: action and scope first, then the mutual-exclusion rule, then the impact caveat. No filler, and the most decision-relevant constraint (exactly one strategy) is front-loaded.

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

Completeness4/5

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

For a destructive mutation with no output schema, the definition covers permission requirements, the exclusivity constraint, and reversibility. The remaining gap is that it never says what a successful purge returns or how failures surface, and it leaves `site` unexplained despite it being required.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must carry parameter meaning. It does map all four strategy parameters (purge_everything, files, tags, prefixes) to plain-language meanings and states the exactly-one constraint, which is genuinely useful. However, the required `site` parameter is never mentioned and `zone_id` is only implied by "for a zone," leaving two of six parameters unaddressed.

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

Purpose4/5

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

States a specific verb and resource ("Purge cached content") scoped to "a zone," which is clear enough to distinguish it from DNS/KV/R2 siblings. It stops short of naming a contrasting alternative (e.g., the WordPress cache tools present in the catalog), so it is clear but not explicitly differentiated.

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?

"Provide exactly one strategy" gives an explicit selection rule among the four modes, which is the main decision an agent faces. It does not state when to prefer another tool (e.g., the WordPress purge siblings) or when not to purge at all, so the usage context is clear but not exhaustive.

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

Deploy Server

Other Tools