Detect anomalies
detect_anomaliesDetects 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
| Name | Required | Description | Default |
|---|---|---|---|
| metric | No | earnings | |
| dimension | No | APP | |
| direction | No | both | |
| account_id | No | AdMob publisher ID, e.g. pub-1234567890123456. Optional: defaults to ADMOB_ACCOUNT_ID or the only account. | |
| recent_days | No | ||
| min_baseline | No | Skip 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_days | No | ||
| include_today | No | ||
| threshold_pct | No | Minimum |change| in percent to flag. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| total | Yes | ||
| metric | Yes | ||
| recent | Yes | ||
| baseline | Yes | ||
| currency | Yes | ||
| anomalies | Yes | ||
| dimension | Yes | ||
| evaluated | Yes | ||
| account_id | Yes | ||
| skipped_low_volume | Yes |