Skip to main content
Glama

Apple Health MCP Server

search_xml_content

Find specific records in Apple Health XML files by searching attribute values. The tool returns matching XML elements, limiting results to a specified maximum. It streams data for memory efficiency.

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.

  • Do not guess, auto-fill, or assume any missing data.

  • When asked for medical advice, try to use my data from ElasticSearch first.

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" }

Other Tools from Apple Health MCP Server

Related Tools

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