Skip to main content
Glama

Apple Health MCP Server

search_health_records_es

Query and retrieve Apple Health records from Elasticsearch by defining search parameters such as record type, source, date range, and values. Use this tool to extract structured health data for analysis or display.

Instructions

Search health records in Elasticsearch with flexible query building.

Parameters:

  • params: HealthRecordSearchParams object containing all search/filter parameters.

Notes for LLMs:

  • This function should return a list of health record documents (dicts) matching the search criteria.
  • Each document in the list should represent a single health record as stored in Elasticsearch.
  • If an error occurs, the function should return a list with a single dict containing an 'error' key and the error message.
  • Use this to retrieve structured health data for further analysis, filtering, or display.
  • Example source_name: "Rob’s iPhone", "Polar Flow", "Sync Solver".
  • Example date_from/date_to: "2020-01-01T00:00:00+00:00"
  • Example value_min/value_max: "10", "100.5"
  • IMPORTANT - Do not guess, auto-fill, or assume any missing data.

Input Schema

NameRequiredDescriptionDefault
paramsYes

Input Schema (JSON Schema)

{ "$defs": { "HealthRecordSearchParams": { "properties": { "date_from": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Date From" }, "date_to": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Date To" }, "limit": { "default": 10, "title": "Limit", "type": "integer" }, "record_type": { "anyOf": [ { "enum": [ "HKQuantityTypeIdentifierStepCount", "HKQuantityTypeIdentifierBodyMassIndex", "HKQuantityTypeIdentifierHeartRate", "HKQuantityTypeIdentifierBodyMass", "HKQuantityTypeIdentifierHeight", "HKQuantityTypeIdentifierDietaryWater", "HKQuantityTypeIdentifierActiveEnergyBurned", "HKQuantityTypeIdentifierBasalEnergyBurned", "HKQuantityTypeIdentifierDistanceWalkingRunning", "HKQuantityTypeIdentifierRunningSpeed", "HKQuantityTypeIdentifierRunningPower", "HKQuantityTypeIdentifierAppleExerciseTime", "HKQuantityTypeIdentifierAppleStandTime", "HKQuantityTypeIdentifierFlightsClimbed", "HKQuantityTypeIdentifierWalkingStepLength", "HKQuantityTypeIdentifierWalkingSpeed", "HKQuantityTypeIdentifierEnvironmentalAudioExposure" ], "type": "string" }, { "type": "string" }, { "type": "null" } ], "default": null, "title": "Record Type" }, "source_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source Name" }, "value_max": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Value Max" }, "value_min": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Value Min" } }, "title": "HealthRecordSearchParams", "type": "object" } }, "properties": { "params": { "$ref": "#/$defs/HealthRecordSearchParams", "title": "Params" } }, "required": [ "params" ], "type": "object" }

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/the-momentum/apple-health-mcp-server'

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