Skip to main content
Glama

cache_query

Search cached answers semantically to retrieve related entries when prompt wording differs. Reuse prior computations without exact key matching.

Instructions

Semantic search across all cached entries, independent of exact key matching. Use this when you suspect something related was already computed even though the prompt wording differs — the knowledge-graph equivalent of a cache lookup by meaning instead of by exact key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to search for semantically related cache entries
top_kNoMax results, default 5
min_similarityNoSimilarity floor 0-1, default 0.3

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.1

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are present, so the description carries the full burden of behavioral disclosure. It adds useful context: the search spans all cached entries and matches by meaning rather than exact key, implying a read-only lookup. However, it does not state whether it mutates anything, what it returns, or any performance implications of scanning all entries.

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?

Two sentences, front-loaded with the core function and then the trigger condition. The 'knowledge-graph equivalent' metaphor adds color but somewhat restates the first sentence, making it slightly less tight than it could be. Overall, it is still concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers what the tool does and when to use it, and the schema covers parameters. However, since there is no output schema, the description omits any indication of return shape or size. It also doesn't mention potential cost or side effects of searching 'all cached entries,' so the profile is adequate but has clear gaps.

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%, with each parameter already documented meaningfully (text, top_k, min_similarity). The tool description adds no parameter-specific information beyond what the schema provides, so the baseline of 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?

The description states a specific verb and resource: 'Semantic search across all cached entries.' It also draws a clear contrast with 'exact key matching,' which distinguishes it from sibling tools like cache_get. An agent can tell what this tool does 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?

It explicitly says when to use the tool: 'when you suspect something related was already computed even though the prompt wording differs.' It implies exact-key lookups are not its purpose by stressing 'independent of exact key matching,' though it doesn't name a specific alternative tool.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kskurtveit/echocache'

If you have feedback or need assistance with the MCP directory API, please join our Discord server