query_body_measurements
Read timestamped body measurements from a local Mi Fitness cache over an inclusive date range, with optional metric filtering or latest-record selection.
Instructions
Read timestamped body measurements over an inclusive YYYY-MM-DD range. Returns data.measurements and data.count in timestamp order; latest_only=true returns only the last matching record, not the latest value of each field. Omitted/empty metrics returns all available fields; otherwise timestamp plus selected fields, with absent optional measurements omitted. Units are kg for mass, percent for body fat/water, dimensionless for BMI. Use query_metric_series(metric=weight_kg) for a daily or aggregated weight trend. latest_only selects before pagination. 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. | |
| metrics | No | Optional body-field projection; timestamp always remains. Omit or [] for all available fields. Missing optional fields are omitted, not zero. | |
| 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. | |
| latest_only | No | Return only the last measurement in this range when true; false returns all matching records. |