Docs

MCP tool · Insights

Get sleep insights

Your sleep insights as the app shows them: per period (day, week or month) a score and rating with metrics (total sleep, efficiency, stages, sleep debt, consistency, breathing, heart rate, HRV and more) and comparisons to the prior period.

get_insights Read-only

For days, the anchor day (or every day, with include_all_sessions) carries its sessions: onset and wake, sleep stages and heart rate / breath rate / HRV per epoch (each session's epoch_seconds gives the length, usually 30 s), and each session_id (for rate_sleep_sessions). Omit granularity for the default bundle (14 days, this and last week, this and last month).

Input

One arguments object with these fields.

Arguments object
  • granularity enum<string>

    Period size. Omit for the default bundle.

    Possible values: day week month

  • anchor string pattern ^\d{4}-\d{2}-\d{2}$

    YYYY-MM-DD inside the last period to return. Defaults to today.

  • count integer min 1max 60

    Periods to return, ending at the anchor (1–60). Defaults: day 14, week 8, month 6.

  • include_all_sessions boolean

    Day granularity only: every day's sessions with their per-epoch arrays, not just the anchor day's. At most 31 days with this on.

Output

Result JSON
  • user_id string required
  • timezone string required
  • granularities record<string, object> required

    Per granularity (day / week / month): periods with scores, metrics and sessions

Example arguments

{
  "granularity": "day",
  "anchor": "<string>",
  "count": 60,
  "include_all_sessions": true
}
JSON
Over HTTP: GET /v1/insights