get_sleep
Access detailed sleep session records from WHOOP and Apple Health, including stage breakdowns and durations. Overlapping nights are deduplicated by default to prevent double-counting.
Instructions
Returns sleep session records from the last days days, newest
first, across both WHOOP and Apple Health (each row's source field
says which). By default, nights covered by both sources return only
the WHOOP row (it wins the same-night precedence rule) so durations
can be summed without double-counting; pass dedupe=False to get every
raw row from both sources. Use this for sleep detail beyond what
health_context() summarizes -- e.g. a specific night's stage breakdown.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| dedupe | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |