Skip to main content
Glama

Purge the CDN cache

cloudcdn_purge
DestructiveIdempotent

Remove cached CloudCDN edge copies so the next request fetches the updated file from origin; use after replacing a file at the same path. Prefer URL or tag purges over purging the whole zone.

Instructions

Remove cached copies from the CloudCDN edge so the next request fetches the file from origin; the stored file itself is not deleted. Use it after replacing a file at the same path. To find what to purge use cloudcdn_assets or cloudcdn_insights_top; if the API seems down, check cloudcdn_health first. Give one target: urls, tags, or everything=true for the whole zone; if several are given, everything wins over tags and tags over urls. Calls POST /api/purge with CLOUDCDN_ACCOUNT_KEY and returns its JSON: success (boolean), purged (the urls or tags sent, or "everything"), remaining_today (purges left of the daily allowance) and cloudflare (the upstream purge API's raw response). Cannot be undone, and a full purge sends every request to origin until the cache refills, so prefer urls or tags. Fails: no target, exit code 64; no CLOUDCDN_ACCOUNT_KEY, a JSON-RPC error; the API rejects an empty list, more than 30 URLs or tags, URLs outside https://cloudcdn.pro/ and tags other than letters, digits and hyphens (HTTP 400, exit code 69), a wrong key (HTTP 401, exit code 77), and more than 100 purges a day (HTTP 429, exit code 75).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cloudcdn_purge"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoCache tags your deploy attached to files (letters, digits and hyphens, e.g. "release-42"), at most 30; purges every file carrying any of them.
urlsNoAbsolute URLs of cached files, at most 30: the CDN origin plus a path from cloudcdn_assets or cloudcdn_insights_top, e.g. "https://cloudcdn.pro/acme/v1/hero.webp".
everythingNotrue to purge the whole zone. Overrides tags and urls; use it only when no list of URLs or tags covers the change.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.0.24
    • addedInput schema / properties / everything / description
      Added value: +"true to purge the whole zone. Overrides tags and urls; use it only when no list of URLs or tags covers the change."
    • addedInput schema / properties / tags / description
      Added value: +"Cache tags your deploy attached to files (letters, digits and hyphens, e.g. \"release-42\"), at most 30; purges every file carrying any of them."
    • addedInput schema / properties / urls / description
      Added value: +"Absolute URLs of cached files, at most 30: the CDN origin plus a path from cloudcdn_assets or cloudcdn_insights_top, e.g. \"https://cloudcdn.pro/acme/v1/hero.webp\"."
  2. First observedv0.0.23

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, idempotentHint=true and openWorldHint=true, so safety and mutability are covered. The description does add real value beyond them: irreversibility, the origin-flooding side effect of a full purge, the auth variable CLOUDCDN_ACCOUNT_KEY, the POST /api/purge endpoint, the return payload fields, and a full error/exit-code table. That is materially more than the annotations, but the destructive semantics themselves are already in the annotations rather than novel.

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?

Front-loaded with the core effect and the non-deletion caveat, then target selection, then mechanics, then failure modes—a sensible order. It is dense and long, and the precedence sentence partially repeats the schema's 'Overrides tags and urls', but nearly every clause carries operational information.

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?

With no output schema, the description supplies the response shape (success, purged, remaining_today, cloudflare), the auth requirement, and a mapping of failure conditions to HTTP and exit codes. For a destructive, rate-limited mutation tool this is as complete as a description needs to be.

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?

Schema coverage is 100%, so a 3 would be the baseline, but the description adds precedence semantics ('everything wins over tags and tags over urls'), the 30-item and URL-prefix/tag-charset validation limits with their HTTP 400 behavior, and the daily allowance cap. These go beyond what the schema text states and help an agent pick the right parameter.

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?

Opens with a specific verb and resource: 'Remove cached copies from the CloudCDN edge,' and immediately disambiguates from a file deletion ('the stored file itself is not deleted'). The subsequent routing to cloudcdn_assets/cloudcdn_insights_top and cloudcdn_health makes its role distinct from every sibling named.

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

Usage Guidelines5/5

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

Gives an explicit trigger ('after replacing a file at the same path'), names the discovery tools to use beforehand, names cloudcdn_health as the fallback when the API looks down, and states a preference ordering ('prefer urls or tags' over a full purge). Nothing is left to inference.

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