Export health data to CSV
export_health_data_csvExport daily health metrics for a date range to a CSV file on disk, bypassing model context limits.
Instructions
Write daily health metrics for a date range to a CSV file on disk, next to the database, instead of returning every row through this tool's own result.
Privacy note: this server and its SQLite file are entirely local, but the data returned by this tool becomes part of the conversation sent to whatever model the calling client is configured with. If that model runs in the cloud rather than on your machine, treat this the same as pasting the data into a chat with that provider.
Unlike read_health_data, this is not capped at MAX_ROWS_RETURNED and the row values themselves are not included in this tool's response — only the resulting file's path and a row count are. That means a long-range export doesn't have to pass through a cloud LLM's context just to produce a file you can open yourself (in a spreadsheet, a notebook, another tool, etc.). Any metric listed in HEALTH_PRIVATE_FIELDS is still written as an empty cell in the file, since those fields shouldn't leave the database at all, not just stay out of the model's context.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | No | Last day to include, formatted YYYY-MM-DD. Defaults to today. | |
| start_date | No | First day to include, formatted YYYY-MM-DD. Defaults to 30 days before end_date. Ranges over ~10 years are rejected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| range | Yes | ||
| rows_exported | Yes |