Skip to main content
Glama
Cloto-dev

CPersona

Official
by Cloto-dev

calibrate_threshold

Automatically sets the vector search threshold to reject unrelated pairs by analyzing the cosine distribution of random memory pairs. Adapts to your embedding model and corpus without labels.

Instructions

Auto-calibrate the vector search threshold from the null (random-pair) cosine distribution. Samples random memory pairs and places the threshold ABOVE the null mean so unrelated pairs are rejected. method='separation' (default) learns the operating point from two populations — null pairs vs temporally-adjacent same-session positives (nearest-neighbour fallback when too few exist); method='percentile' uses a quantile of the null distribution (robust to anisotropic models such as bge-m3); method='zscore' uses mean + z*std. No labels used, purely statistical. Adapts to both embedding model and corpus characteristics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNo'separation' (default; two-population — learns the operating point from null pairs vs temporally-adjacent same-session positives, falling back to nearest-neighbour when too few exist), 'percentile', or 'zscore'
agent_idYesAgent ID whose memories to sample
z_factorNoZ-score multiplier for method='zscore' (default: 1.0, higher = stricter)
percentileNoNull-distribution quantile for method='percentile' (default: 0.95, higher = stricter)
sample_sizeNoNumber of embeddings to sample (default: 200)
Behavior3/5

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

Describes statistical method and says no labels used, but does not disclose side effects (e.g., whether it persists the threshold, modifies agent state, or causes latency). Without annotations, this is a gap for a potentially destructive operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single paragraph is well-structured and front-loaded. Each sentence contributes. Could be slightly more structured (e.g., bullet methods), but overall concise and clear.

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?

Covers statistical methods thoroughly but omits output (what is returned? confirmation? threshold value?), error scenarios, and post-calibration state. No output schema, so description should compensate.

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 covers all 5 parameters with descriptions. The description adds value by explaining when each method is appropriate (e.g., percentile robust to BGE-M3), and provides default context. Exceeds baseline due to extra behavioral context.

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?

Clearly states the verb 'auto-calibrate' and resource 'vector search threshold'. Provides specific statistical context (null cosine distribution, random pairs) and distinguishes from sibling tools by its specialized calibration function.

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?

Implied usage for setting search threshold after data collection, but no explicit when-to-use or when-not-to-use compared to alternatives like manual set_recall_precision. The method details give context but not explicit guidance.

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