Skip to main content
Glama

Clear the cache

cache_clear
DestructiveIdempotent

Clear cached responses to force a refetch. Optionally target a single source, or remove only expired entries for safe routine housekeeping.

Instructions

Drop cached responses so the next call refetches. Pass a source to clear just that one, or omit to clear everything. Use expiredOnly for routine housekeeping, which never discards a live entry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNoClear one source. Omit to clear all of them.
expiredOnlyNoRemove only entries past their TTL. Safe to run any time.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and idempotentHint=true, so the safety profile is largely covered. The description adds real context beyond them: expiredOnly 'never discards a live entry,' clarifying that destructiveness is conditional and scoping via source limits blast radius.

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 short sentences, front-loaded with the core effect, then scoping, then the safe mode. Every sentence earns its place with no redundancy.

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 and none needed for a cache-clear operation; the description covers effect, scoping, and the safe-vs-aggressive distinction. An agent has everything required to call it 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 description coverage is 100%, so both parameters are already documented in the schema. The description's wording ('omit to clear everything', 'never discards a live entry') slightly reinforces but does not materially extend the schema semantics, so the baseline 3 applies.

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 and resource ('Drop cached responses') plus the operational consequence ('so the next call refetches'). This clearly distinguishes it from the sibling cache_status (read) by being the mutating counterpart.

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 explicit conditional guidance for both parameters: pass a source to scope the clear, omit to clear all, and use expiredOnly for routine housekeeping. It stops short of naming cache_status as the inspection alternative, but the when-to-use guidance is clear.

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