Skip to main content
Glama

Fix stale cache serving

fix_stale_cache
Read-onlyIdempotent

Use after a scan reports STALE_CACHE_SERVED (visitors and crawlers get an old cached homepage). Fetches the homepage now and returns its Age, the cache layers that name themselves in the headers in purge order (innermost first), the HTML lifetime each response declares, a fresh-read comparison, and whether a purge clears the finding and keeps it cleared. Read-only; it does not purge anything. Give domain, or a report id (the page is still fetched now because cache state is live).

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": "fix_stale_cache"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoReport id; the page is still fetched now, because cache state is live
domainNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, non-destructive, open-world, so the description's job is to add what they don't say: it discloses that the page is fetched live rather than read from a stored report, that cache layers are returned in purge order innermost-first, and that a simulated purge is tested for persistence. That is real added value, though it doesn't touch cost, latency, or failure modes of the live fetch.

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

Conciseness3/5

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

The trigger is correctly front-loaded, but the description is one long run-on sentence with stacked clauses and parentheticals ('(innermost first)', '(visitors and crawlers get an old cached homepage)'). Every clause carries information, yet the return-value inventory could be split or trimmed for faster parsing.

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 and a diagnostic tool whose value is entirely in its return payload, the description enumerates the returned signals (Age, ordered cache layers, declared HTML lifetime, fresh-read comparison, purge-clear outcome) and states the read-only safety boundary. Nothing an agent needs in order to call and interpret it 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?

Schema coverage is 50% (domain is undocumented in the schema), and the description compensates by explaining the domain-or-id alternation and, crucially, why the id path still triggers a live fetch ('the page is still fetched now because cache state is live'). Both parameters gain meaning beyond the schema, though the either/or is never stated as an exclusivity rule.

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?

The description states a concrete verb chain (fetch the homepage, report Age, cache layers, declared HTML lifetime, fresh-read comparison, purge outcome) tied to a single resource, the live homepage cache state. It also resolves the misleading 'fix_' name by declaring 'Read-only; it does not purge anything.' It stops short of naming a sibling (e.g. explain_finding or scan_domain) as the adjacent step, so 4 rather than 5.

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?

'Use after a scan reports STALE_CACHE_SERVED (visitors and crawlers get an old cached homepage)' gives an explicit trigger condition tied to a specific finding code. It gives clear context without exclusions or named alternatives, which is the 4 band.

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.