Skip to main content
Glama

analysis_anomalies_check

Detects anomalies in campaign metrics by comparing current data against a median-based baseline from historical action logs. Flags critical issues like zero spend, CPA spikes, and CTR drops with severity ordering.

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.
Behavior4/5

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

With no annotations, the description covers key behaviors: severity-ordered anomalies, gating conditions (e.g., 30+ conversions for CPA spike), baseline construction from STATE.json, and fallback when history insufficient. It omits whether the tool modifies state or error handling for missing files, but overall is thorough.

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 dense paragraph but front-loads the main purpose. Every sentence provides useful information. It could be more scannable with bullet points, but it's appropriately sized and not verbose.

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

Completeness3/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 should clarify return structure (e.g., anomaly fields like severity, type, message). It mentions severity-ordered anomalies but not the specific fields. Also missing error conditions. Adequate but not complete for a read-analysis tool.

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 descriptions already cover all parameters. The description adds value by explaining baseline logic, default values, and condition gates (e.g., CPA spike requires 30+ conversions). This goes 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 specifies the verb 'detect', the resource 'anomalies for one campaign', and the method, 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 usage for anomaly detection in campaign metrics and provides thresholds for when anomalies are triggered. However, it does not explicitly state when not to use this tool or mention alternatives like other performance analysis tools.

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