Skip to main content
Glama
admob-mcp

admob-mcp

by oleksandrtry

Detect anomalies

detect_anomalies
Read-onlyIdempotent

Detects sharp deviations in recent AdMob performance by comparing recent daily averages to a median baseline and flagging groups that drop or spike beyond a set threshold.

Instructions

Finds apps / ad units / countries / formats / platforms whose recent daily performance deviates sharply from their own baseline. Method: mean of the last recent_days days vs the MEDIAN daily value of the preceding baseline_days days; flagged when the change is at least threshold_pct. Low-volume groups are skipped. Today is excluded by default because its data is incomplete.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "detect_anomalies"
  }
}

Input Schema

NameRequiredDescriptionDefault
metricNoearnings
dimensionNoAPP
directionNoboth
account_idNoAdMob publisher ID, e.g. pub-1234567890123456. Optional: defaults to ADMOB_ACCOUNT_ID or the only account.
recent_daysNo
min_baselineNoSkip groups whose baseline daily median is below this. For eCPM it applies to impressions, for match_rate to requests. Defaults: earnings 1, impressions/requests 100, clicks 5, ecpm/match_rate 1000.
baseline_daysNo
include_todayNo
threshold_pctNoMinimum |change| in percent to flag.

Output Schema

NameRequiredDescriptionDefault
totalYes
metricYes
recentYes
baselineYes
currencyYes
anomaliesYes
dimensionYes
evaluatedYes
account_idYes
skipped_low_volumeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description correctly spends its budget on behavior the annotations cannot express: the exact detection formula, the low-volume suppression rule, and the default exclusion of today's incomplete data. It does not mention rate limits or cost, but output schema covers the return shape.

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?

Four sentences, purpose first, then the algorithm, then the two caveats that change how results should be read. Dense with no filler; only the parenthetical 'Method:' label is slightly formalistic.

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 9-parameter analytical tool, the description supplies the method, the suppression rule, and the today-handling default; the schema documents account_id and min_baseline defaults, and an output schema exists so return values need not be described. Remaining gap is mainly the absence of explicit sibling routing guidance.

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?

With schema coverage at 33%, the description meaningfully compensates: it defines what `recent_days` and `baseline_days` control (mean window vs. median baseline window) and what `threshold_pct` flags, plus the soft low-volume gate tied to `min_baseline`. It adds nothing for `metric`, `direction`, or `dimension` beyond their enums, but the interpretive semantics of the three numeric knobs are the ones that matter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

A concrete verb ('Finds') and a precisely scoped resource: groups across apps / ad units / countries / formats / platforms whose recent daily performance deviates from baseline. The statistical framing (mean vs. median, threshold) makes it distinguishable from a plain period comparison, although no sibling is named as an alternative.

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?

Usage is implied by the purpose and the defaults (direction=both, include_today=false), and the low-volume skip note tells the agent results may be incomplete. There is no explicit 'use this instead of compare_periods when…' guidance and no statement of prerequisites beyond the account_id default in the schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.