health_get_sleep
Retrieve nightly sleep data—duration, stages, and efficiency—from a local cache, with an option to fetch live from the Google Health API.
Instructions
Get nightly sleep data (duration, stages, efficiency).
Returns sleep data from the local cache by default. Use live=True to fetch from the API. Run health_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: 30 days back from the end date or today, whichever is earlier. end_date: End date as "YYYY-MM-DD", "YYYY-MM" (its last day), or "Nd". Default: today. live: If true, re-fetch this window from the API before reading the cache.
Returns one entry per night with total_minutes, efficiency, start/end times, and stage breakdown (deep, light, REM, wake minutes).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "health_get_sleep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| live | No | ||
| end_date | No | ||
| start_date | No |