Skip to main content
Glama

cache_threshold_recommendation

Recommends a tuning threshold for a semantic cache by analyzing rolling similarity scores to improve cache hit rates.

Instructions

Threshold-tuning recommendation for a semantic_cache, based on the rolling similarity-score window. Errors with INVALID_CACHE_TYPE on agent_cache.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoRestrict to a single category; omit for the global threshold
cache_nameYesCache name as registered in __betterdb:caches (e.g. 'betterdb_scache_prod').
instanceIdNoConnection ID; defaults to the active instance
minSamplesNoMinimum samples required (default 100)
Behavior3/5

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

With no annotations, the description carries the burden. It reveals it uses a rolling similarity-score window and errors on invalid cache types, but does not state whether the tool is read-only or has side effects. Moderate transparency but could disclose more about output or state changes.

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?

The description is two sentences with no wasted words. The first sentence explains the core purpose and mechanism, the second adds a critical error condition. Highly efficient.

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

Completeness2/5

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

The tool lacks an output schema, so the description should explain what the recommendation looks like (e.g., format or return value). It does not. Given the complexity of a threshold recommendation, the agent is left guessing the output structure, making it incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds meaningful context beyond schema descriptions, such as 'omit for global threshold' for category, registration context for cache_name, and defaults for instanceId and minSamples. This helps the agent use parameters correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it provides a threshold-tuning recommendation for a semantic_cache based on a rolling similarity-score window. It is specific about the action and resource, but does not explicitly differentiate from siblings like cache_propose_threshold_adjust or cache_similarity_distribution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions an error condition (INVALID_CACHE_TYPE on agent_cache), implying it is intended for semantic_cache only. However, there is no explicit guidance on when to use this tool vs alternatives like cache_propose_threshold_adjust, leaving the agent to infer usage context.

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

Install Server

Other Tools

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/BetterDB-inc/monitor'

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