health_query
Run read-only DuckDB SQL queries on Apple Health export data to extract health metrics, using a semantic layer to prevent aggregation mistakes.
Instructions
Run a read-only DuckDB SQL query against the health tables. Call health_schema first so you know the columns and the correct aggregate function for each metric.
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": {
"query": "<query>"
},
"name": "health_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum rows to return (default 1000, maximum 5000). | |
| query | Yes | A single SELECT or WITH statement. |