WHOOP Sleep Trend
whoop_sleep_trendAggregate WHOOP sleep over recent days to reveal trend direction for performance, duration, and efficiency, answering if sleep is improving or degrading.
Instructions
Aggregate WHOOP sleep over the last N days (default 30) into a per-metric trend for sleep performance percentage, sleep duration (hours) and sleep efficiency percentage.
Each metric returns { avg, min, max, slope, direction, n_valid } where slope is a least-squares fit over the chronologically ordered scored sleeps (oldest to newest) and direction is rising, falling, stable or insufficient_data. Use this to answer "is my sleep improving or degrading?" without paging the raw collection yourself. Read-only; fetches recent WHOOP v2 records, computes statistics, stores nothing. Not medical advice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Number of days to aggregate into the trend. Minimum 2 (slope needs two points), maximum 30. Defaults to 30. | |
| timezone | No | IANA timezone reserved for display, e.g. America/New_York. | UTC |
| response_format | No | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| metrics | Yes | ||
| diagnostic | Yes | ||
| data_quality | Yes | ||
| generated_at | Yes | ||
| lookback_days | Yes |