Skip to main content
Glama

check_embedding_drift

Detects embedding drift by comparing current embeddings of canary strings against saved snapshots. Alerts when maximum cosine drift exceeds threshold, catching silent model upgrades that degrade retrieval accuracy.

Instructions

Embedding-drift canary. Without args, re-embeds the saved CANARY_STRINGS and reports per-canary cosine drift; alarm fires when max_drift > threshold (default 0.05 ≈ cosine<0.95). Pass capture=true to seed the snapshot first (idempotent unless force=true). Catches silent provider model upgrades that would otherwise corrupt index recall without changing dim.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoWith capture=true, overwrite an existing snapshot.
captureNoEmbed CANARY_STRINGS and persist the snapshot.
thresholdNoMax allowed drift (1 - cosine). Default 0.05.
Behavior5/5

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

The description fully explains behavior: idempotent capture, default threshold, and the purpose of detecting silent upgrades. Annotations indicate readOnlyHint=false, and the description confirms write operations (capture). No contradictions.

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 concise sentences, no fluff, front-loaded with purpose. Every sentence adds value.

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

Completeness5/5

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

Given the tool's complexity (3 optional params, no output schema), the description covers inputs, behavior, defaults, and use case thoroughly. No gaps remain.

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%, but the description adds context beyond schema: it explains default behavior without args, idempotency of capture, and the significance of the threshold. This adds value for an agent.

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 states the tool is an 'Embedding-drift canary' and explains its two modes (re-embedding or capturing). It distinguishes from sibling tools by focusing on drift detection, unlike the document retrieval tools.

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?

The description explains when to use the tool: for detecting silent model upgrades. It provides guidance on the two main use cases (capture vs. check) and the threshold parameter, though it doesn't explicitly state 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/jgravelle/jdocmunch-mcp'

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