Overview
Mirobody Health includes two essential health tools that enable AI agents to access and analyze user health data securely.get_user_health_profile
Retrieve comprehensive user profile and summary
get_health_indicator
Query specific health metrics and time-series data
get_user_health_profile
Retrieves the user’s complete health profile including connected devices, summary statistics, and profile information.Function Signature
Parameters
User authentication information. This parameter is automatically provided by the system when called through MCP. Do not manually pass this parameter.
Use Cases
- Profile Overview: Display user’s health profile in a dashboard
- Device Status: Check which devices are connected and syncing
- Data Availability: Verify what health data is available for analysis
- Agent Context: Provide agents with user context for personalized responses
get_health_indicator
Retrieves specific health indicator data with optional time range filtering.Function Signature
Parameters
User authentication information (automatically provided)
Health indicator name. Examples:
HEART_RATE: Heart rate measurementsDAILY_STEPS: Daily step countSLEEP_DURATION: Sleep durationHRV: Heart rate variabilityWEIGHT: Body weight
Start time for filtering data (ISO 8601 format). Example:
2024-01-01T00:00:00ZEnd time for filtering data (ISO 8601 format). Example:
2024-01-15T23:59:59ZMaximum number of records to return. Default: 100, Maximum: 1000
Use Cases
- Trend Analysis: Query heart rate data over a week to analyze trends
- Comparative Analysis: Compare sleep duration across different months
- Correlation Studies: Examine relationships between different health metrics
- Report Generation: Pull data for personalized health reports
Querying Health Data
Both tools query thetheta_ai.th_series_data table which contains standardized health indicators from all connected devices.
Available Indicators
Activity Indicators
Activity Indicators
DAILY_STEPS: Step count per dayDAILY_DISTANCE: Distance traveledDAILY_CALORIES_ACTIVE: Active calories burnedDAILY_CALORIES_BASAL: Basal metabolic rateACTIVE_TIME: Active time durationDAILY_FLOORS_CLIMBED: Floors climbed
Heart Rate Indicators
Heart Rate Indicators
HEART_RATE: Instantaneous heart rateDAILY_HEART_RATE_RESTING: Resting heart rateDAILY_HEART_RATE_MIN: Minimum daily heart rateDAILY_HEART_RATE_MAX: Maximum daily heart rateDAILY_AVG_HEART_RATE: Average daily heart rateHRV: Heart rate variability (RMSSD)
Sleep Indicators
Sleep Indicators
DAILY_SLEEP_DURATION: Total sleep timeSLEEP_IN_BED: Time in bedDAILY_AWAKE_TIME: Time awake during sleepDAILY_LIGHT_SLEEP: Light sleep durationDAILY_DEEP_SLEEP: Deep sleep durationDAILY_REM_SLEEP: REM sleep durationSLEEP_EFFICIENCY: Sleep efficiency percentage
Body Metrics
Body Metrics
WEIGHT: Body weightHEIGHT: HeightBMI: Body mass indexBODY_FAT_PERCENTAGE: Body fat percentageSKELETAL_MUSCLE_MASS: Skeletal muscle mass
Example Agent Queries
Here are examples of how AI agents can use these tools:- Profile Query
- Trend Analysis
- Comparison
User: “What health devices do I have connected?”Agent Action:Response: “You have 2 devices connected: Garmin (last synced 2 hours ago) and Whoop (last synced 1 hour ago).”
Security
OAuth Authentication
OAuth Authentication
All user data tools require OAuth authentication. The
user_info parameter is automatically validated before tool execution.Data Scoping
Data Scoping
Tools can only access data for the authenticated user. Cross-user data access is prevented at the database level.
Audit Logging
Audit Logging
All tool calls are logged with user ID, timestamp, and parameters for security auditing.