Skip to main content
Glama

Apple Health MCP Server

search_xml_content

Query Apple Health XML files to find records or workouts matching specific text. Returns up to a defined number of results, enabling efficient searches for devices, types, or values without loading the entire file into memory.

Instructions

Search for specific content in the Apple Health XML file and return matching records as XML text.

Parameters:

  • query: Text to search for in any attribute value
  • max_results: Maximum number of matching records to return (default: 50)

Returns:

  • A string containing up to max_results XML elements that match the query, or a message if no matches are found.

Notes for LLMs:

  • Searches both Record and Workout elements
  • Useful for finding all records containing a specific value, device, or type
  • This function streams the file for memory efficiency and does not load the entire file into memory.
  • If filename is not provided, the file set by set_xml_file will be used.

Input Schema

NameRequiredDescriptionDefault
max_resultsNo
queryNo

Input Schema (JSON Schema)

{ "properties": { "max_results": { "default": 50, "title": "Max Results", "type": "integer" }, "query": { "default": "", "title": "Query", "type": "string" } }, "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