Skip to main content
Glama
PhilipAD

Health Export AI

by PhilipAD

get_health_metrics

Read-onlyIdempotent

Retrieve Apple Health metric values for any date range with avg, sum, min, max, or latest aggregation, plus data coverage details.

Instructions

Get values for a metric (or all metrics) over an optional date range, with an aggregate (avg/sum/min/max/latest). The core data-retrieval tool. Every result carries a coverage block giving the metric's real firstDate/lastDate/days: check it before trusting a long window, and note that aggregate is always computed over the full range even when points are rolled up. Single-metric answers also list any logged point events inside the window as segmentBoundaries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoYYYY-MM-DD
limitNoMaximum data points to return (default 365, max 3000). The server rolls up rather than truncating.
startNoYYYY-MM-DD
metricNoMetric name, e.g. step_count, heart_rate, sleep_analysis. Omit for all.
filterDaysNoRestrict to days covered by matching logged events (health-events.json): endDate ranges cover every day inclusive, point events cover their single day, negate:true keeps only days NOT covered. The answer states how many days matched. Example: HRV on night-shift blocks vs days off.
aggregationNo
granularityNoRoll daily values up before returning them. 'auto' (default) picks the finest granularity that fits the response budget, so a multi-year range returns monthly points instead of thousands of daily ones.
Behavior4/5

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

The description adds substantial behavioral context beyond annotations: it reveals the `coverage` block with real firstDate/lastDate/days, warns to verify long windows, clarifies that `aggregate` is computed over the full range even when points are rolled up, and mentions segmentBoundaries for point events. These are meaningful nuances that annotations (readOnly, idempotent) do not cover.

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?

Only three sentences: purpose first, then critical behavioral warnings, and a final note about segmentBoundaries. Every sentence contributes value, and the most important caveats are front-loaded after the core purpose.

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

Completeness4/5

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

Given the complexity (7 params, nested object, no output schema), the description covers essential pitfalls: the coverage block, aggregate behavior with rollups, and event segments. It explains partial return structure but leaves some details (error behavior, exact format of points) to inference. Still, it is reasonably complete for a read-only tool without an output schema.

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

Parameters3/5

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

Schema coverage is 86%, so most parameters already have descriptions. The tool description does not add per-parameter semantics beyond the schema; it focuses on general behavior and result structure. The baseline of 3 applies since the schema handles the heavy lifting, and the description's behavioral notes (e.g., aggregate over full range) are more about operation than parameter meaning.

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?

The description states a precise verb and resource ('Get values for a metric (or all metrics) over an optional date range, with an aggregate') and even labels itself 'The core data-retrieval tool,' which conveys its role. However, it does not explicitly differentiate from siblings like get_trends or compare_periods, leaving potential ambiguity about which tool covers which analytical task.

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

Usage Guidelines3/5

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

Calling itself 'the core data-retrieval tool' implies it is the general-purpose retrieval endpoint, but there is no explicit guidance on when to prefer siblings, what user scenarios warrant get_trends vs. this, or exclusions. The guidance is implied rather than stated.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PhilipAD/health-export-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server