Detect metric anomalies
detect_metric_anomaliesFlag days when a personal health metric deviates sharply from its own recent baseline, using a robust modified z-score to detect true outliers in noisy self-tracked data.
Instructions
Flag days where one metric deviated sharply from its own baseline over the window, using a median/MAD-based modified z-score rather than a mean/stdev z-score — more robust for short, noisy personal-health series, where the mean/stdev version is easily dragged around by the very outliers it's supposed to catch.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metric | Yes | One of steps, sleep_hours, resting_heart_rate, weight_kg, workout_minutes, mood, water_ml, heart_rate, hrv_ms. | |
| end_date | No | Last day to include, formatted YYYY-MM-DD. Defaults to today. | |
| threshold | No | Modified z-score cutoff. 3.5 (the default, Iglewicz & Hoaglin's standard value) flags only clear outliers; lower it (e.g. 2.5) to see more borderline days. | |
| start_date | No | First day to include, formatted YYYY-MM-DD. Defaults to 90 days before end_date. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | ||
| metric | Yes | ||
| evidence | Yes | Coverage/quality of the data a single-metric analytical result is based on. See evidence.build_evidence for how each field is computed. | |
| anomalies | Yes | ||
| threshold | Yes |