log_sleep
Log overnight sleep or a separate nap with duration, bedtime, wake time, and tracker scores or stage breakdown, so daily wellness records stay accurate and queryable.
Instructions
Log an overnight sleep entry or a separate nap. Use for a concrete sleep event from a tracker or recall. Question/habit/hypothetical alone: no write.
PROACTIVE DATA COLLECTION: For an overnight entry without numbers, ask: "How many hours did you sleep, and do you have a sleep score or stage breakdown from your tracker?" For a nap, use NAPS below.
INFER — do not ask:
date: local date the sleep or nap ended; default to today
NAPS: Set is_nap=true for a daytime nap or other short sleep separate from the main night, even when the user only says "I napped." Provide its start (bedtime) and/or end (wake_time), plus duration (total_hours) or both times. Ask for a time if neither is known; never invent one. Naps must be under undefined hours. They are separate sessions and never replace or increase overnight sleep. Overnight total_hours means the main night only.
Overnight entries accept any subset of fields. One row per date, updated on repeat. All entries are tagged manual; wearable-provider sources are reserved for auto-sync.
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": {
"date": "<date>"
},
"name": "log_sleep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Local date the sleep or nap ended. Format: YYYY-MM-DD. Default to today. | |
| is_nap | No | Whether this is a separate nap. Default false; see NAPS above. | |
| bedtime | No | Bedtime / primary sleep session start time. Format: ISO 8601 timestamp (e.g. 2026-08-16T22:47:00-04:00) or HH:MM wall-clock time. Optional. | |
| wake_time | No | Wake time / primary sleep session end time. Format: ISO 8601 timestamp (e.g. 2026-08-17T06:21:00-04:00) or HH:MM wall-clock time. Optional. | |
| awakenings | No | Number of times woken during the night. Optional. | |
| sleep_score | No | Sleep quality score on a 0-100 scale (matches wearable scoring). For a 1-10 self-rating, multiply by 10 first. Optional. | |
| total_hours | No | Total sleep duration in hours (e.g. 7.5). Optional. | |
| rem_sleep_hours | No | REM sleep in hours. Optional — include if the tracker reports it. | |
| deep_sleep_hours | No | Deep/slow-wave sleep in hours. Optional — include if the tracker reports it. | |
| light_sleep_hours | No | Light sleep in hours. Optional — include if the tracker reports it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Human-readable result text returned by the tool. |