fitbit_get_sleep
Retrieve nightly sleep data including duration, stages, and efficiency for a date range. Use live mode to fetch directly from Fitbit API instead of cached data.
Instructions
Get nightly sleep data (duration, stages, efficiency).
Returns sleep data from the local cache by default. Use live=True to fetch from Fitbit API. Run fitbit_sync first to populate the cache.
Sleep data is sparse: only nights with watch-tracked sleep are present. Travel, off-wrist nights, or manual logs may be missing.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: last 30 days. end_date: End date as "YYYY-MM-DD". Default: today. live: If true, fetch directly from Fitbit API instead of cache.
Returns one entry per night with total_minutes, efficiency, start/end times, and stage breakdown (deep, light, REM, wake minutes).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| live | No | ||
| end_date | No | ||
| start_date | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |