Find Anomalies
find_anomaliesFlag days whose metric value deviates more than threshold_sigma standard deviations from the rolling-window mean. Default window 90 days, default threshold 2σ. Use when the user asks 'when did my HRV crash?' or 'pick out my worst sleep weeks'. Returns empty list (and insufficient_baseline=true) if fewer than 14 non-null days. Pass user's LOCAL end_date as strict YYYY-MM-DD.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"metric": "<metric>",
"end_date": "<end_date>"
},
"name": "find_anomalies"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metric | Yes | Metric to scan for outliers. | |
| end_date | Yes | End of window YYYY-MM-DD, user's LOCAL date (inclusive). | |
| lookback_days | No | Window size in days, 7-365. Default 90. | |
| threshold_sigma | No | Z-score magnitude that qualifies as an anomaly. Default 2. |