Skip to main content
Glama
Quantified Self MCP Server

Quantified Self MCP Server

Export health data to CSV

export_health_data_csv
DestructiveIdempotent

Exports daily health metrics for a date range to a CSV file on disk next to the database, returning only the file path and row count to keep large exports out of the model context.

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, so a long-range export doesn't have to pass through a cloud LLM's context. Any metric listed in HEALTH_PRIVATE_FIELDS is still written as an empty cell, since those fields shouldn't leave the database at all.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "export_health_data_csv"
  }
}

Input Schema

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

Output Schema

NameRequiredDescriptionDefault
pathYes
rangeYes
rows_exportedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.2
    • changedInput schema / properties / end_date / description
      Previous value: -"Last day to include, formatted YYYY-MM-DD. Defaults to today."New value: +"Last day to include, YYYY-MM-DD. Defaults to today."
    • changedInput schema / properties / start_date / description
      Previous value: -"First day to include, formatted YYYY-MM-DD.\nDefaults to 30 days before end_date. Ranges over ~10 years are rejected."New value: +"First day to include, YYYY-MM-DD. Defaults to 30\ndays before end_date. Ranges over ~10 years are rejected."
  2. Addedv1.0.16
  3. Removedv1.0.15
  4. Addedv1.0.11

TDQS

A4.7/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and idempotentHint=true, but the description adds substantial context the annotations cannot: the file lands on disk next to the database, only a path and row count come back, HEALTH_PRIVATE_FIELDS are written as blank cells, and a caller's cloud model would receive the data. The one gap is overwrite semantics — nothing says whether an existing CSV at that path is replaced, which is precisely why destructiveHint is true.

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?

The purpose is front-loaded before the privacy caveat, and each paragraph does work — behavior, privacy, differentiation, field redaction. The privacy note is slightly long for what it conveys, but it is the kind of context an agent should surface to a user before calling a destructive write.

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?

An output schema exists, yet the description still briefly states that the response is a path plus row count, which is the single fact an agent most needs to avoid assuming rows come back. Combined with the privacy framing, file location, and cap difference from read_health_data, nothing needed for a correct call is missing.

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

Parameters5/5

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

With 100% schema coverage and only two optional date parameters already documented as YYYY-MM-DD with defaults, the schema carries the semantics and the description adds complementary meaning: it frames the range in terms of export volume and reinforces that private-field cells are blanked regardless of range.

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?

The opening sentence names a specific verb and resource — "Write daily health metrics for a date range to a CSV file on disk, next to the database" — and states the decisive scope distinction: rows are not returned through the tool's own result. An agent can tell this apart from read_health_data on the first line without opening any schema.

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

Usage Guidelines5/5

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

It names the alternative (read_health_data) and the exact condition that selects this tool instead: the export is "not capped at MAX_ROWS_RETURNED" and row values don't pass through the model's context. The rationale (long-range exports avoiding cloud LLM context) gives the agent enough to route correctly on size/context grounds.

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