log_sleep
Log an overnight sleep entry or a separate nap. use: a concrete sleep event from a tracker or recall. Question/habit/hypothetical alone: no write.
DATA COLLECTION: overnight entry without numbers -> ask: "How many hours did you sleep, and do you have a sleep score or stage breakdown from your tracker?" Nap -> NAPS.
INFER, do not ask: date = the local date the sleep or nap ended; default today.
NAPS: is_nap=true for a daytime nap or other short sleep separate from the main night, even when the user only says "I napped." Give its start (bedtime) and/or end (wake_time), plus duration (total_hours) or both times. Neither time known -> ask; never invent one. Naps must be under 3 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. Every entry is 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, YYYY-MM-DD; default today. | |
| is_nap | No | true = a separate nap; default false. See NAPS. | |
| bedtime | No | Bedtime / primary sleep session start: ISO 8601 timestamp (e.g. 2026-08-16T22:47:00-04:00) or HH:MM wall-clock time. | |
| wake_time | No | Wake time / primary sleep session end: ISO 8601 timestamp (e.g. 2026-08-17T06:21:00-04:00) or HH:MM wall-clock time. | |
| awakenings | No | Times woken during the night. | |
| sleep_score | No | Sleep quality 0-100 (wearable scale). A 1-10 self-rating: multiply by 10 first. | |
| total_hours | No | Total sleep hours, e.g. 7.5. | |
| rem_sleep_hours | No | REM sleep hours, when the tracker reports it. | |
| deep_sleep_hours | No | Deep/slow-wave sleep hours, when the tracker reports it. | |
| light_sleep_hours | No | Light sleep hours, when the tracker reports it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Human-readable result text returned by the tool. |