Get Sleep
get_sleepSummarize sleep samples for the authenticated user only. Sleep sessions whose date interval overlaps the query window match, including sessions spanning midnight. summary.sleep reports deduplicated elapsed time so overlapping Apple Health records are not counted twice; use it for sleep duration instead of summary.duration, which describes the source records themselves. Results are ordered by start date (newest first by default) and capped at limit (default 100, max 1000); summary.mayHaveMore reports when more samples matched. Set includeSamples to true only when raw samples are required.
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": "get_sleep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| order | No | Sort order by sample start date. desc returns the most recent samples first. | desc |
| endDate | No | ||
| startDate | No | ||
| includeSamples | No |