Skip to main content
Glama

analysis_anomalies_check

Detect campaign anomalies by comparing current metrics to a median baseline from action-log history. Flags zero spend, CPA spikes, and CTR drops, ordered by severity.

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 provided, the description carries the full burden and largely succeeds: it discloses return ordering (severity-ordered), specific anomaly types (zero spend, CPA spike, CTR drop), gating thresholds, and the null-baseline condition. It stops short of describing every edge case (e.g., read-only behavior) but provides strong transparency.

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 dense, non-redundant sentences. The first front-loads purpose, the second lists concrete outputs and thresholds, and the third explains an edge-case condition. Every sentence earns its place; no fluff.

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?

For a moderately complex detection tool with no output schema, the description covers core inputs, thresholds, null-baseline behavior, and return ordering. It does not specify the exact anomaly object structure, but given no output schema that is a minor, not critical, gap.

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?

Input schema covers all four parameters with descriptions (100% coverage), so baseline is 3. The description adds valuable interpretive context: median-based baseline source, severity gating thresholds, and the default min_baseline_entries=7 behavior, which deepens understanding beyond the raw 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 'Detect anomalies for one campaign by comparing its current metrics against a median-based baseline built from STATE.json's action_log history.' This specifies a concrete verb, resource, and method, distinguishing it from general analysis siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for single-campaign anomaly detection and mentions internal threshold conditions (e.g., 30+ conversions, 1000+ impressions), but does not explicitly instruct when to choose this tool over alternatives like google_ads_cpc_detect_trend or meta_ads_analysis_cost. No exclusions or alternative references are given.

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