Apple Health: run SQL
health_queryRun one read-only SQLite query against Apple Health data to return JSON rows for daily metrics, sleep, and workouts, using aggregate functions or LIMIT to keep results focused.
Instructions
Run one read-only SQLite query on the user's Apple Health database and get rows as JSON (at most 2000; aggregate or LIMIT). Start from the daily view (one row per day: steps, energy, resting heart rate, HRV, sleep, weight and more), nights for sleep, workouts for training. health_overview lists every view and column.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "health_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One SQLite SELECT statement. |