Skip to main content
Glama

Clear caches

cache_clear
DestructiveIdempotent

Clears in-process caches when reads appear stale after files change outside Venira; returns cleared entry counts per cache.

Instructions

Clear in-process caches (all, read, info, list, search, recent, negative, graph, shell). Use when: reads look stale because a tool changed files outside Venira. Avoid when: normal flow: writes already invalidate caches. Output: cleared entry counts per 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": "cache_clear"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoCache to clear (default all). negative = cached not_found paths; graph = import graph.all

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuinely new context: that clearing is normally unnecessary because writes self-invalidate, and that the response reports cleared entry counts per cache. It does not mention the cost of re-warming caches after a clear, a notable omission for a destructive operation.

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?

Four tight lines, front-loaded with the action, then Use when / Avoid when / Output labels. Every sentence carries decision-relevant information and nothing is repeated.

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?

For a one-parameter tool with no output schema, the description covers the action, its scope, the trigger condition, the reason not to use it, and the shape of the return value. Nothing an agent needs in order to invoke it correctly is missing.

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% and the single parameter already documents the enum values, including 'negative = cached not_found paths' and 'graph = import graph'. The description merely restates the same list, adding no syntax or behavioral meaning beyond the schema; 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 ('Clear in-process caches') and enumerates exactly which caches are covered, matching the enum in the schema. An agent can tell immediately that this is the only cache-invalidation tool, distinct from file-editing siblings like apply_patch or edit_file.

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?

Explicitly gives a trigger ('reads look stale because a tool changed files outside Venira') and an exclusion ('normal flow: writes already invalidate caches'), which is exactly the when/when-not guidance that prevents unnecessary destructive calls. It stops short of naming a fallback action (e.g., re-read the file instead), so it falls just under a 5.

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