Skip to main content
Glama

calibrate_threshold

Auto-calibrate vector search thresholds using statistical z-score analysis of sampled memory pairs. Sets optimal similarity cutoffs that adapt to embedding models and corpus characteristics without 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)
Behavior4/5

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

With no annotations provided, description carries full burden and delivers excellent algorithmic transparency (sampling random pairs, computing cosine distribution, setting threshold at mean + z*std). However, it omits explicit disclosure of whether this modifies persistent agent configuration or merely returns a calculated value.

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?

Four sentences with zero waste: method summary, algorithm details, data requirements, and adaptation benefits. Information is front-loaded with the core purpose in the first sentence, appropriate for the parameter complexity.

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?

Despite rich schema coverage, lacks disclosure of output behavior (whether it returns the threshold value, sets internal state, or both) and omits guidance on persistence scope, which is critical behavioral context given no output schema exists.

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% with clear descriptions, but the description adds crucial mathematical context linking z_factor to the 'mean + z*std' formula and explaining the sampling methodology, enhancing understanding of parameter interactions beyond the schema defaults.

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?

Description states precise verb (auto-calibrate), resource (vector search threshold), and method (null distribution z-score), clearly distinguishing from sibling tools like 'recall' or 'store' that perform search or write operations rather than statistical calibration.

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?

Implies unsupervised usage via 'No labels used, purely statistical' and suggests adaptive scenarios, but lacks explicit guidance on when to invoke versus using default thresholds or how it relates to the 'recall' sibling tool.

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