Skip to main content
Glama

check_embedding_drift

Read-onlyIdempotent

Detects silent embedding model swaps that degrade hybrid retrieval by capturing a canary vector baseline and flagging cosine distance drift above a threshold.

Instructions

Pin and re-check a 16-string canary against the active embedding provider. Catches silent provider model swaps (OpenAI/Voyage/etc.) that quietly degrade hybrid retrieval. First call (or with capture=true) saves the baseline; subsequent calls report max cosine distance vs baseline. Read-only or write-only (capture). Returns JSON: { status, message, max_distance?, mean_distance?, per_string? }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
captureNoForce a fresh baseline capture, overwriting any existing canary file.
thresholdNoCosine-distance threshold for flagging drift (default 0.05).
Behavior4/5

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

The description adds valuable context beyond annotations: it discloses read-only/write-only behavior based on the capture flag, explains baseline storage and drift reporting, and lists return fields. No contradiction with annotations; the description clarifies that write occurs only when capturing.

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 very concise: four sentences, no fluff. It front-loads the purpose and key behavior, then details modes and output. Every sentence serves a clear purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, good schema coverage, and annotations, the description is fairly complete. It explains behavior, input/output, and return format. Minor gap: does not mention default threshold or what triggers drift alerts beyond returning the distance.

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?

Input schema covers both parameters with descriptions (100% coverage), fulfilling the baseline. The tool description does not add new meaning to parameters beyond the schema; it only explains their role in the overall process (e.g., 'capture=true saves baseline').

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 action ('Pin and re-check a 16-string canary against the active embedding provider') and specific purpose ('Catches silent provider model swaps'). It distinguishes the tool from siblings like 'check_architecture' or 'detect_drift' by focusing on embedding drift, but does not explicitly name alternatives.

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 explains the two modes (first call with capture saves baseline; subsequent calls report distance), which implies usage. However, it does not explicitly state when to use this tool versus alternatives (e.g., when to use detect_drift or check_claudemd_drift). Guidance is functional but not comparative.

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/nikolai-vysotskyi/trace-mcp'

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