Skip to main content
Glama

cache_threshold_recommendation

Analyze rolling similarity scores to recommend a threshold for a semantic cache, aiding in cache performance tuning.

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
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It discloses one error condition (INVALID_CACHE_TYPE on agent_cache), but it does not clarify whether the recommendation is read-only, what side effects exist, or any authentication or permission requirements. More detail is needed for full transparency.

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 at two sentences. The first sentence immediately states the purpose, and the second adds a key error detail. No wasted words, and the structure is front-loaded.

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 any information about the return value or output format, which is critical since no output schema is provided. It does not specify what the recommendation looks like (e.g., a number, a range, or a JSON object). For a recommendation tool, this is a significant gap.

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%, so the schema already documents all four parameters. The tool description adds no new meaning to individual parameters beyond the schema's own descriptions. Baseline score of 3 is appropriate.

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 the tool provides a 'threshold-tuning recommendation for a semantic_cache' based on a 'rolling similarity-score window'. It also specifies an error condition for agent_cache. However, it does not explicitly differentiate from sibling tools like cache_propose_threshold_adjust or cache_approve_proposal, which may have overlapping purposes.

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 implies usage for semantic caches by noting the error on agent_cache, but it provides no explicit guidance on when to use this tool versus alternatives such as cache_propose_threshold_adjust. It does not state prerequisites or when not to use it.

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