Skip to main content
Glama

calibrate_threshold

Auto-calibrates vector search threshold by analyzing random memory pairs and setting a statistical cutoff, adapting to embedding model and corpus without requiring labeled data.

Instructions

Auto-calibrate vector search threshold using null distribution z-score. Samples random memory pairs, computes cosine distribution, sets threshold at mean + z*std. No labels used, purely statistical. Adapts to both embedding model and corpus characteristics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesAgent ID whose memories to sample
sample_sizeNoNumber of embeddings to sample (default: 200)
z_factorNoZ-score multiplier (default: 1.0, higher = stricter)
Behavior3/5

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

No annotations are provided, so the description must fully disclose behavior. It explains the algorithm (sampling memory pairs, computing cosine distribution, setting threshold) but does not specify what the tool returns or if it modifies a global threshold (side effects). This leaves some ambiguity.

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?

Three sentences, each serving a distinct purpose: stating the core method, emphasizing no labels, and highlighting adaptability. No filler or redundancy.

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 tool has no output schema, and the description does not mention what the tool returns (e.g., the computed threshold) or any side effects (e.g., updating a configuration). It also omits prerequisites like ensuring the agent_id exists. For a tool of moderate complexity, more detail is needed.

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 coverage is 100%, so the baseline is 3. The description adds the phrase 'higher = stricter' for z_factor, but for agent_id and sample_size it does not add meaningful context beyond the schema descriptions.

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 clearly specifies the tool's action: auto-calibrate vector search threshold using a null distribution z-score. It distinguishes from sibling tools (none of which are calibration-related) and provides a specific verb-resource pair.

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?

Describes that no labels are used (purely statistical) and that it adapts to embedding model and corpus characteristics, which helps the agent understand when this tool is appropriate. However, it does not explicitly state when not to use it or offer alternatives.

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/Cloto-dev/CPersona'

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