Skip to main content
Glama

List Apple Health Records

apple_health_list_records
Read-onlyIdempotent

List 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

TableJSON Schema
NameRequiredDescriptionDefault
endNoOptional ISO date/time upper bound.
typeNoApple Health record type, e.g. HKQuantityTypeIdentifierStepCount.
limitNo
startNoOptional ISO date/time lower bound.
privacy_modeNo
response_formatNomarkdown
incremental_cacheNoWhen 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial context beyond the annotations: the full-file scan cost model (~33 ms per MB, ~3 s for 84 MB), in-memory caching of identical queries, the fact that `limit` caps only the returned list and not the aggregate, and the nested `numeric` statistics shape. This far exceeds the bar set by readOnlyHint/idempotentHint and does not contradict them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense and front-loaded: purpose and the critical `limit` caveat come first, followed by cost and mode guidance. Slightly long, but every sentence carries operational weight — the COST block, caching note, and mode routing all earn their place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 7 parameters and no output schema, the description is thorough. It covers the return shape (truncated/limit_applied/matched_count and nested numeric stats), the cost model, caching, and mode behavior. Little an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 57%, leaving limit, privacy_mode, and response_format undocumented in the schema. The description compensates by explaining `limit` semantics (caps the list only, not the aggregate), the three privacy modes and their behavior, and the aggregate block's nested structure. This is meaningful value added beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'List bounded records from a local Apple Health export.xml.' It is distinguishable from siblings like apple_health_list_workouts (workouts only) and apple_health_daily_summary (aggregated view) by focusing on raw record listing with type/start/end filters. However, it never names a sibling explicitly, leaving the agent to infer the distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Offers explicit mode-selection guidance — 'For a cheap bounded page with no full-file scan, pass privacy_mode "structured" or "raw"' — and spells out the cost tradeoff of summary mode versus the cached repeat-query path. It does not explicitly exclude sibling tools (e.g., when to prefer list_workouts), so the alternative-routing guidance is intra-tool rather than cross-tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.