healthsql
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HEALTHSQL_DB | No | Path to the SQLite database file that healthsql builds and queries (e.g. /tmp/healthsql-sample.db). On a Mac the default is ~/Library/Application Support/HealthSQL/health.db. | |
| HEALTHSQL_EXPORT_DIR | No | Path to the iPhone export folder to read Health records from (e.g. "$PWD/testdata/export" for the sample data). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
The user's whole Apple Health record, in a local SQLite database that their iPhone keeps current. Call health_overview once to learn the views, then health_query with SQL. For any daily number use the daily or days view: they hold Apple Health's own totals. Never sum samples for a day; several devices record the same steps. Each answer carries phone_synced (how fresh the data is) and, when something is wrong, a problem line that says what the user must do; tell them. If the data cannot answer what the user needs, or something looks wrong, tell them they can write to contact@dkbuilds.co.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| health_overviewA | What the user's Apple Health database holds: when their iPhone last synced, each view with its columns and when to use it, example queries, and every metric with its unit and date range. Call this first, once. |
| health_queryA | 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 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 2 tools
The two tools occupy clearly separate phases: health_overview is a one-time schema/metric discovery call, while health_query executes SQL. The descriptions explicitly sequence them ('Call this first, once' vs 'Run one read-only SQLite query'), leaving no room for misselection.
Both names follow a strict `health_<noun>` snake_case pattern, and the nouns (overview, query) accurately reflect each tool's role. No mixed conventions or stray verbs.
Two tools is on the thin side, but for a read-only SQL interface the discovery+execute pair is a legitimate minimal design rather than a gap. A third convenience tool (e.g. saved/favorite queries or a metric catalog) could add value but is not required.
Arbitrary read-only SQL over documented views means any analytical question is answerable, and health_overview prevents dead ends by exposing every view, column, and metric. Write operations and any result-export or pagination helpers are absent, though read-only scope appears intentional for a personal health database.