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
Name | Required | Description | Default |
---|---|---|---|
max_results | No | ||
query | No |