Skip to main content
Glama

ddb_clear_cache

Idempotent

Wipe in-process caches so the next call re-fetches from D&D Beyond. Use it when search results look like the SRD/Open5e fallback after login, forcing an immediate retry.

Instructions

Wipe in-process caches so the next call re-fetches from D&D Beyond. Use this when search results look like the SRD/Open5e fallback (e.g. 2024 cantrips missing from spell results) after you've logged in — the partial compendium build is cached for up to 5 minutes and this forces an immediate retry. cache='spells' (default) clears just the spell/reference compendium; 'all' wipes every cache.

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

Input Schema

NameRequiredDescriptionDefault
cacheNoWhich cache to clear. 'spells' (default) — the spell / equipment / races / classes / feats compendium. 'characters' — character JSON cache and the subclass always-prepared spell lists. 'monsters' — monster stat-block cache, the full monster list, the game config, and the Open5e SRD creature data (including a remembered Open5e failure). 'all' — everything, including the library list, campaigns and Open5e responses.spells

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.0.0
    • changedInput schema / properties / cache / description
      Previous value: -"Which cache to clear. 'spells' (default) — the spell / equipment / races / classes / feats compendium. 'characters' — character JSON cache. 'monsters' — monster stat-block cache. 'all' — everything, including campaigns and Open5e responses."New value: +"Which cache to clear. 'spells' (default) — the spell / equipment / races / classes / feats compendium. 'characters' — character JSON cache and the subclass always-prepared spell lists. 'monsters' — monster stat-block cache, the full monster list, the game config, and the Open5e SRD creature data (including a remembered Open5e failure). 'all' — everything, including the library list, campaigns and Open5e responses."
  2. First observedv2.10.2

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that the caches are in-process, that they expire in up to 5 minutes, and that clearing forces an immediate re-fetch. This reconciles cleanly with the annotations (readOnlyHint=false since it mutates cache state; destructiveHint=false since nothing permanent is lost).

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?

Three tight, front-loaded sentences: purpose, trigger, then parameter scoping. The final sentence partially duplicates the schema's enum documentation, which is the only wasted motion.

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?

Single optional parameter, no output schema, and annotations already cover the safety profile. Everything needed to decide when and how to call it — symptom, precondition, blast radius per cache option, and recovery behavior — is present.

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 enum's own descriptions are more detailed than the description text. The description restates the 'spells' default and the 'all' option but adds no meaning beyond the schema, so 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 — 'Wipe in-process caches so the next call re-fetches from D&D Beyond' — and immediately names the observable effect. It is unmistakably a cache-maintenance tool, distinct from every search/get sibling in the list.

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 ('when search results look like the SRD/Open5e fallback'), a concrete diagnostic symptom (2024 cantrips missing from spell results), and a precondition ('after you've logged in'). It also names the implicit alternative — waiting out the ~5 minute TTL — and positions this tool as the immediate retry.

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