set_sleep_window
Sets one night's bedtime and wake time, moving or creating the sleep window filed under the wake-up date.
Instructions
Sets one night's bedtime and wake time, moving it or creating it; filed under the wake-up date. Sets one night's bedtime and wake time, as Garmin Connect's edit-sleep-times dialog does. cdate is the date Garmin files the night under, the WAKE-UP day. Reads the night through getSleepData first. A RECORDED night's id is its current sleepStartTimestampGMT in epoch ms and CHANGES after every edit, so it is read fresh, then PUT to /sleep-service/sleep/dailySleep/{id} with `{calendarDate, sleepStartTimestampGMT, sleepEndTimestampGMT, sleepTimeSeconds, napTimeSeconds, sleepWindowConfirmed:…
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cdate": "<cdate>",
"sleepStart": "<sleepStart>",
"sleepEnd": "<sleepEnd>"
},
"name": "set_sleep_window"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cdate | Yes | Calendar date, YYYY-MM-DD (UTC) | |
| sleepEnd | Yes | A moment in time, ISO 8601, e.g. 2026-09-28T07:30:00 (local) or with Z/offset | |
| sleepStart | Yes | A moment in time, ISO 8601, e.g. 2026-09-28T07:30:00 (local) or with Z/offset |