Skip to main content
Glama

cache_threshold_recommendation

Recommends an optimal threshold for a semantic cache by analyzing rolling similarity scores. Specify a cache name; optionally restrict to a category or set minimum samples.

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
cache_nameYesCache name as registered in __betterdb:caches (e.g. 'betterdb_scache_prod').
categoryNoRestrict to a single category; omit for the global threshold
minSamplesNoMinimum samples required (default 100)
instanceIdNoConnection ID; defaults to the active instance
Behavior2/5

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

With no annotations provided, the description must fully disclose behavioral traits. It mentions the rolling similarity-score window and the error condition, but it fails to state whether the tool is read-only, has side effects, requires specific data prerequisites, or any performance/rate limit implications. The description is insufficient for an agent to understand the tool's impact.

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 extremely concise, with two sentences that directly state the purpose and an important error condition. It is front-loaded, contains no redundant information, and every word adds value. This is an example of efficient communication.

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 description lacks information about the tool's output (what the recommendation looks like) and does not elaborate on the rolling window behavior or how optional parameters influence results. Given the absence of an output schema, the description should compensate by explaining the return value and key semantics, which it does not. The tool's purpose is simple, but the description is incomplete for an agent to fully understand its use.

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?

The input schema has 100% description coverage for all four parameters, each with clear definitions. The description adds no further meaning beyond the schema, but the baseline score of 3 is appropriate since the schema already provides adequate context. The description does not clarify how parameters like 'category' or 'minSamples' affect the recommendation.

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' and explains the mechanism using 'rolling similarity-score window'. The purpose is specific and includes a verb and resource, but it does not explicitly differentiate from sibling tools like 'cache_propose_threshold_adjust' or 'cache_similarity_distribution', which could be used for similar purposes.

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

Usage Guidelines2/5

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

The description gives a negative condition ('Errors with INVALID_CACHE_TYPE on agent_cache'), indicating it should not be used for agent_cache, but it lacks positive guidance on when to use this tool versus alternatives. It does not mention prerequisites, context, or specific scenarios where this recommendation is beneficial, leaving the agent underinformed about tool selection.

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