Skip to main content
Glama

Clear cached data for one site (not the whole cache)

browser_clear_site_cache
Destructive

Clear cached data for one specific site without wiping the entire Firefox cache; provide a schemeless domain like example.com and optionally choose which data kinds to remove.

Instructions

Clear cached data for a SINGLE site instead of the whole cache. MEASURED: this needs ClearDataService from resource://gre/modules/ClearDataService.sys.mjs, constructed with new, then deleteDataFromSite(site, {}, isUserRequest, flags, callback). Two traps: the site argument is a SCHEMELESS site (example.com, not https://example.com/), and the callback must be an object with onDataDeleted(resultFlags) — passing a plain function hangs forever. resultFlags 0 means every cleaner succeeded.

Input Schema

NameRequiredDescriptionDefault
siteYesSchemeless site, e.g. example.com
kindsNoWhat to clear (default: all caches)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.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; the description adds real behavior beyond that — the schemeless-site trap, the callback-object requirement that otherwise 'hangs forever,' and the meaning of resultFlags 0. Some of this (ClearDataService, new, the exact method signature) is developer-facing internals rather than agent-actionable behavior, which keeps it from a 5.

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 key point is front-loaded well and the 'two traps' are genuinely useful, but the middle chunk detailing ClearDataService, `new`, and the full deleteDataFromSite signature is implementation detail an agent calling this tool cannot act on. That material dilutes an otherwise tight description.

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 single-site clear with annotations carrying the safety profile and no output schema, the description covers scope, the critical schemeless input requirement, and success signaling (resultFlags 0). It omits details about the 'kinds' selector behavior and effects on currently loaded pages, but is otherwise sufficient to invoke correctly.

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 coverage is 100% and the 'site' schema entry already documents the schemeless format, so the description largely restates that trap for emphasis rather than adding new semantics. The 'kinds' parameter is not elaborated beyond the schema's 'default: all caches,' so it does not compensate further.

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?

The opening sentence states a specific verb and resource ('Clear cached data') and explicitly scopes it to 'a SINGLE site instead of the whole cache,' which distinguishes it from the whole-cache sibling (browser_clear_cache). An agent can identify the operation and its scope without opening the 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?

The phrase 'instead of the whole cache' implies the alternative tool and the condition that selects this one (targeted, per-site clearing). It gives clear context but never names browser_clear_cache or browser_clear_data explicitly, so there is mild inference left to the agent.

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