Skip to main content
Glama

detect_anomaly

Detect anomalies in cost, latency, error rate, and call volume by comparing current data to a baseline window. Adjust sensitivity to control detection thresholds.

Instructions

Compare the current window against a baseline window (the immediately preceding window of the same length) and detect anomalies across 4 axes: cost / latency / error_rate / call_volume — lets an AI grasp "is anything off?" in one prompt. Sensitivity is tunable via threshold: sensitive (1.5x) / normal (2x, default) / conservative (3x). 0-4 detections, each with a narrative. Returns { window, threshold, current: {...}, baseline: {...}, anomalies: [{ axis, severity: 'minor'|'major'|'critical', current, baseline, ratio, narrative }] }. errorRate is evaluated and displayed as a percent (0-100), matching the backend aggregate unit. Insufficient baseline data (fewer than 10 records in the period) yields anomalies: [] plus a warning message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
windowNoObservation window ('1h' / '24h' / '7d', default '24h')24h
thresholdNoSensitivity ('sensitive' 1.5x / 'normal' 2x / 'conservative' 3x, default 'normal')normal
Behavior5/5

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

With no annotations, the description fully shoulders the burden. It details the baseline window logic, tunable sensitivity with explicit thresholds (1.5x, 2x, 3x), the 4 axes, output structure, errorRate formatting as percent, and an edge case for insufficient data. This is comprehensive.

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?

The description is a single paragraph that efficiently covers purpose, parameters, output, and edge cases without redundancy. It is front-loaded with the core comparative logic. Minor room for restructuring but overall compact and informative.

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 no output schema, the description fully specifies the return structure including nested objects, severity levels, ratio, and narrative. It also covers the edge case of insufficient baseline data. For a tool with 2 parameters and a well-defined output, this is complete and self-contained.

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 both parameters documented, but the description adds meaning: it maps threshold enum values to multiplier meanings (sensitive=1.5x, etc.) and explains that window is the observation period. It also clarifies the 4 axes of detection, which is not in the schema.

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 it compares a current window to a baseline to detect anomalies across 4 specific axes (cost, latency, error_rate, call_volume). This is unique among the sibling tools, which focus on CRUD, alerts, evaluations, etc., making it easily distinguishable.

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 explicitly says it lets an AI grasp 'is anything off?' in one prompt, indicating usage for anomaly detection. While it doesn't list when not to use or alternatives, the context is clear and no similar sibling tool exists, making usage intuitive.

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/argosvix/mcp-server'

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