Skip to main content
Glama
burakdirin

apple-health-export-mcp

get_quantity

Read-onlyIdempotent

Aggregate numeric health metrics from Apple Health over a date range. Choose sum for cumulative data like steps or avg for sampled data like heart rate, with options for time bucket and source filtering.

Instructions

Aggregate a numeric metric (steps, weight, heart rate, energy…) over a date range.

Call list_types first to find the exact type string. Pick agg by metric kind: sum for cumulative (steps, active energy), avg for sampled (weight, heart rate). sum auto-deduplicates parallel devices (Watch + iPhone + apps) per day, so it does not over-count (ADR-0010); pass source to force one device. avg/min/max are not deduped. Returns [{period, value, n}].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aggNoAggregation: 'sum' for cumulative metrics (steps, energy), 'avg' for sampled ones (heart rate, weight).sum
endYesLocal calendar date, ISO 'YYYY-MM-DD'.
typeYesHealthKit type identifier. Discover valid values with `list_types`.
startYesLocal calendar date, ISO 'YYYY-MM-DD'.
bucketNoGroup results by this time bucket.day
sourceNoRestrict to one source/device (see `list_sources`). Omit to auto-dedupe parallel devices.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate readOnlyHint and idempotentHint. The description adds valuable behavioral context: auto-deduplication for sum with ADR-0010, no dedup for avg/min/max, and return format [{period, value, n}]. No contradictions with annotations.

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

Conciseness5/5

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

Five sentences, well-structured and front-loaded. Every sentence adds necessary information. No unnecessary words or repetition.

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?

Covers all key aspects: type discovery, agg selection, dedup behavior, source parameter, return format. Has output schema implicitly mentioned. No gaps given the complexity.

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 coverage is 100%, baseline 3. The description adds meaning beyond schema: explains auto-dedup for sum, that source forces one device, and return format. Examples of type strings are also helpful.

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

Purpose5/5

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

The description clearly states the tool aggregates numeric metrics over a date range. It distinguishes from siblings by focusing on quantitative metrics and references list_types for type discovery. The verb 'aggregate' and resource 'numeric metric' are specific.

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?

The description explicitly tells the agent to call list_types first for the exact type string. It also instructs on when to use sum vs avg based on metric kind and mentions dedup behavior. However, it does not explicitly exclude usage compared to sibling tools like get_sleep or get_workouts.

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/burakdirin/apple-health-export-mcp'

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