How suitable a room was for sleep, night by night
get_nightsReturns the nights of one bedroom, hotel room, or B&B or holiday-home room, one record per night, newest first, each saying how suitable the room was for sleep. The night is the unit, and a night belongs to the evening it starts on. A record carries the night window, the rest period (when the room was in use for sleeping; null on a night it was not used, which then has no score), the night score from 0 to 100 with its band, the factor that held it back and each of noise, thermal, air, light and humidity, and the conditions over the night: temperature and how it drifted, CO₂ with the minutes over 1000, 1500 and 2000 ppm and the air change it implies, humidity with the dew point and whether the coldest surface risked damp, the background sound and each noise event by time and level (over more than fourteen nights, each night's loudest and the count), when the room went dark and when first light came, what sounded like snoring and when, and the ids of the advice the night points to. Three sound fields are reported and never scored, and all three are sounds from the room, never about anyone's health: restless is the minutes of unsettled sound from inside the room (the level well above the background, not snoring and not a loud event), per hour and in stretches; cough_sneeze_sounds is the minutes in which something sounded like a cough or a sneeze, with their times; snore counts windows (short moments the sound classifier heard as snoring), events (runs long enough to count) and minutes (minutes holding at least one event), with the stretches they formed. It describes the room, never the sleeper: not how anyone slept, no sleep stages and no length of sleep, never a number of people, and snoring is sound that sounds like snoring, never a statement about anyone's health. A night is clearer drawn than listed: CO₂ climbing through it, the snoring stretches and the noise events on one time axis. A room of any other type answers with no nights and says why. This is the answer to how last night was in a room and why a bedroom is stuffy in the morning; for what happened in a room hour by hour on one day, get_timeline, and for the measurements behind a night, get_history. Requires a PitCanary account.
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": {
"room_id": "<room_id>"
},
"name": "get_nights"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | The last night to read, YYYY-MM-DD, named by the evening it starts on, inclusive. At most 31 nights at a time. For last night alone, from and to are both yesterday's date. | |
| from | No | The first night to read, YYYY-MM-DD, named by the evening it starts on, inclusive. Give from and to together; with neither, the last seven nights ending with last night. | |
| room_id | Yes | The room id, as returned by list_rooms. |