List Apple Health Records
apple_health_list_recordsList Apple Health records from a local export.xml with type, date, and limit filters; includes aggregate statistics in summary mode for filtered matches.
Instructions
List bounded records from a local Apple Health export.xml. Use type/start/end filters to keep output small. limit caps the returned LIST only: in summary privacy mode (the default) the aggregate block (count_by_type, units, date_range, numeric) is computed over every record matching the filter, and truncated/limit_applied/matched_count say whether the list itself was cut. The statistics are nested under numeric (numeric.count/sum/average/min/max), not at the top of aggregate. COST: because the aggregate must cover every match, summary mode reads the whole export file on each new query — roughly 33 ms per MB of export.xml (~3 s for 84 MB, ~11 s for 336 MB), and type/start/end do not shorten it. Repeating an identical query is served from an in-memory cache and returns instantly. For a cheap bounded page with no full-file scan, pass privacy_mode 'structured' or 'raw', which stop at limit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Optional ISO date/time upper bound. | |
| type | No | Apple Health record type, e.g. HKQuantityTypeIdentifierStepCount. | |
| limit | No | ||
| start | No | Optional ISO date/time lower bound. | |
| privacy_mode | No | ||
| response_format | No | markdown | |
| incremental_cache | No | When true and `type` is set, skip records already seen in a previous call (per-category cache at ~/.apple-health-mcp/incremental-cache.json). Cache auto-invalidates when the export file mtime changes. |