Skip to main content
Glama
Thecimal

Quantified Self MCP Server

Export health data to CSV

export_health_data_csv
Read-only

Export 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

TableJSON Schema
NameRequiredDescriptionDefault
end_dateNoLast day to include, formatted YYYY-MM-DD. Defaults to today.
start_dateNoFirst day to include, formatted YYYY-MM-DD. Defaults to 30 days before end_date. Ranges over ~10 years are rejected.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
rangeYes
rows_exportedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.16
  2. Removedv1.0.15
  3. Addedv1.0.11

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: it discloses that returned data enters the conversation/cloud-model context, that HEALTH_PRIVATE_FIELDS are written as empty cells, and that the response contains only a path and row count rather than row values. These are non-obvious behavioral traits an agent cannot infer from readOnlyHint/openWorldHint alone. Note the tension with readOnlyHint=true for a tool that writes a file to disk, but the write is to the filesystem, not the source data, and the description is transparent rather than misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence, followed by rationale and privacy caveats. It runs long for a two-parameter export tool, and minor details like 'next to the database' add little, but nearly every sentence carries real information (privacy, private-field handling, response shape).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, so return values needn't be explained, yet the description still clarifies the response shape (path + row count). Combined with the privacy note and private-field handling, an agent has everything needed to call it and interpret the result correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (both date params documented with format and defaults), so the schema carries the parameter burden. The description only references 'a date range' generically and adds no format or constraint detail beyond the schema's own ~10-year rejection note. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource+output: 'Write daily health metrics for a date range to a CSV file on disk... instead of returning every row through this tool's own result.' It directly contrasts with read_health_data, so an agent can tell it apart from the read tools without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names the sibling alternative (read_health_data) and the condition that differentiates it: not capped at MAX_ROWS_RETURNED, and a long-range export needn't pass through the LLM's context. It stops short of an explicit routing rule ('use this instead when...'), but the context is clear enough to choose correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.