query_spo2
Read stored blood oxygen saturation samples from the local Mi Fitness cache across a date range, returning timestamps and SpO2 percentages.
Instructions
Read stored blood oxygen saturation samples (spo2_pct, percent) over an inclusive YYYY-MM-DD range. Returns data.samples [{timestamp, spo2_pct}] and data.count, earliest first. limit defaults to 5000; use offset for subsequent pages. These are device measurements, not a diagnosis; missing records do not indicate normal oxygen levels. Use query_heart_rate for bpm rather than oxygen saturation. Read-only local SQLite query; no cloud request or automatic sync. Requires a configured local account/cache. Returns JSON text with status, source=cache, generated_at and data; empty lists mean no cached matches, not zero measurements. Use get_data_coverage to inspect availability or sync_data to refresh with user consent. Returns data.pagination {limit, offset, has_more, next_offset}; next_offset is null at the end. Keep filters unchanged and avoid syncing between pages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum records per page (1-5000); count describes this page only. | |
| offset | No | Zero-based position; pass pagination.next_offset unchanged with the same filters. | |
| end_date | Yes | Inclusive last calendar date, YYYY-MM-DD; must be on or after start_date. | |
| start_date | Yes | Inclusive first calendar date, YYYY-MM-DD; must be on or before end_date. Uses stored calendar dates, not caller timezone conversion. |