Sleep history
vaultbeat_sync_sleepFetch and decrypt encrypted sleep records, then return per-day primary session summaries; set summary_only to trigger a sync or verify connectivity without retrieving full session data.
Instructions
Fetch encrypted Vaultbeat sleep records, decrypt them locally, and return per-day primary session summaries matching the iOS app's display.
Returns daily_summary (one primary session per local date, selected by
iOS priority: Watch > iPhone > inBedOnly) and sessions (all raw records).
The limit controls how many raw blobs are fetched; 50 covers ~2-3 weeks.
Use owner prefix to filter by person β take it from vaultbeat_status
(owner_user_id_prefix is the paired user; server 0.7.1+), or
vaultbeat_doctor for every owner present in the data. Without it, both
partners' data is mixed and per-day selection may pick the wrong
person's session.
β οΈ is_in_bed_only: true means sleep was NEVER MEASURED that night (the
Watch wasn't worn) β NOT that the person slept zero. On those nights
total_sleep_minutes is 0, duration_label reads "no sleep data", and
in_bed_minutes holds the time actually recorded in bed. Report such a
night as "no sleep data (in bed ~Xh)", never as "slept 0 hours".
Results are served from a short-lived local cache (default 10 min); pass fresh=True to force a cloud round trip.
Carries a coverage block: quote coverage.days_covered (distinct days, not
the row count) and coverage.span_days beside any average or trend, and read
coverage.window_satisfied: false as a shorter history than asked, not as a
missing kind. π΄ Before saying how far back someone's data goes, read
coverage.more_available: true means this server can decrypt days OLDER
than first_day that your limit left behind β re-read with a larger
limit, or quote coverage.oldest_available as the real start of their
history. Never report a limit-shaped window as the extent of their data.
π Pass summary_only=True when you only want the SIDE EFFECT. A default
call returns every decrypted session β measured at 76,446 characters, which
overflows a typical tool-result limit and gets spilled to a file the caller
then has to read back. That is the right shape when you want the nights; it
is pure waste when you called this to make the server do something (force a
sync, check the link is alive, confirm a deploy took effect), which is a
large share of real calls. summary_only=True returns the counts, the day
range and the coverage block, and nothing else. For the nights themselves,
get_sleep_detail is the tool that exists for it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fresh | No | ||
| limit | No | ||
| owner | No | ||
| summary_only | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||