Skip to main content
Glama

analysis_anomalies_check

Detect campaign anomalies by comparing current metrics against a historical baseline. Returns severity-ordered alerts for zero spend, CPA spikes, and CTR drops, gated by minimum data thresholds.

Instructions

Detect anomalies for one campaign by comparing its current metrics against a median-based baseline built from STATE.json's action_log history. Returns severity-ordered anomalies — zero spend (CRITICAL), CPA spike (HIGH/CRITICAL, gated by 30+ conversions), CTR drop (HIGH/CRITICAL, gated by 1000+ impressions). No baseline is produced when history < min_baseline_entries (default 7).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
currentYesPoint-in-time metrics for the campaign.
state_fileNoPath to STATE.json. Resolved inside the server's current working directory; traversal or symlink escape is rejected. Defaults to 'STATE.json'.
had_prior_spendNoSet false for fresh campaigns that have never spent. Suppresses the zero-spend alert in that case.
min_baseline_entriesNoMinimum action_log entries required to build a baseline. Default 7 (one week). Below this the tool returns baseline=null and evaluates only zero-spend.
Behavior5/5

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

Despite no annotations, the description excels in disclosing behavioral traits: baseline construction, gated thresholds for anomalies, effect of had_prior_spend, and behavior when history is insufficient. 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?

The description is concise (3-4 sentences) yet packed with essential details. It is front-loaded with the main action and every sentence provides value without redundancy.

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?

The description covers the main behavior and output (severity-ordered anomalies, baseline=null condition). However, it does not detail the exact output structure. Given no output schema, a bit more precision on return format would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds significant value: explains defaults, gated thresholds, derivation of optional parameters, and the effect of had_prior_spend. It goes well beyond 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 the tool detects anomalies for one campaign by comparing current metrics against a median-based baseline. It lists specific anomaly types (zero spend, CPA spike, CTR drop) with severity levels, distinguishing it from sibling analysis 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 implies use for checking anomalies on a single campaign, but does not explicitly state when not to use it or mention alternatives. However, the context is clear enough for an agent to infer appropriate usage.

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/logly/mureo'

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