Skip to main content
Glama

Detect Performance Anomalies

anomaly_detect
Read-onlyIdempotent

Detect anomalies in ad campaigns by comparing current metrics to a rolling baseline. Flags CPC spikes, CTR drops, spend surges, and conversion cliffs. Specify sensitivity and lookback window; get alerts with severity and deviation details to prevent budget waste.

Instructions

Scan campaigns for statistical anomalies vs. a rolling baseline. Flags CPC spikes, CTR drops, sudden spend surges, and conversion cliffs. Input: sensitivity ("low"|"medium"|"high" — controls the z-score threshold), lookback_days (baseline window, default 14), optional platform filter. Returns {anomalies_found, severity_breakdown (critical|high|medium|low counts), alerts[] (each with campaign_id, metric, baseline, current, deviation, severity, reason)}. Run daily to catch issues before they burn budget.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformNoFilter by platform
sensitivityNoDetection sensitivitymedium
lookback_daysNo
Behavior4/5

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

Annotations already confirm read-only (readOnlyHint: true) and idempotent (idempotentHint: true) behavior. The description adds that the tool compares against a rolling baseline and flags specific changes like CPC spikes, CTR drops, etc. It clarifies the sensitivity parameter's effect on z-score threshold and the lookback window's default (14, overriding schema default 7) – a useful behavioral detail not captured by annotations.

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 three sentences: purpose, input summary, output summary. It efficiently conveys key information without redundancy, though the output structure details could be slightly more concise.

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 no output schema, the description provides a thorough output structure (anomalies_found, severity_breakdown, alerts with fields). It covers input parameters and use case, making it complete for an analysis tool with sibling context.

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?

The description explains what sensitivity controls (z-score threshold) and the default for lookback_days (14 vs schema default 7). The platform filter is mentioned as optional, and the return structure is detailed. Since schema description coverage is 67%, the description compensates by adding context to all three parameters.

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 tool name 'anomaly_detect' and description clearly specify it scans campaigns for statistical anomalies using a rolling baseline. It lists specific anomaly types (CPC spikes, CTR drops, spend surges, conversion cliffs), distinguishing it from siblings like 'budget_analyze' or 'competitor_benchmark'.

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 suggests daily runs for catching issues early, providing clear context. While it doesn't explicitly specify when not to use it, the listed sibling tools offer alternatives (e.g., 'budget_analyze' for budget-specific analysis). The description manages expectations well but lacks exclusions.

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/enzoemir1/adops-mcp'

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