Skip to main content
Glama
Thecimal

Quantified Self MCP Server

Export health data to CSV

export_health_data_csv
DestructiveIdempotent

Export daily health metrics for a date range to a CSV file on disk, bypassing AI context. Get a file path and row count while private fields stay protected.

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.6/5.0
Behavior5/5

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

Annotations mark destructiveHint=true and readOnlyHint=false, and the description fully supports this: it states it writes to disk, does not return row values, and only provides file path and row count. It goes beyond annotations by disclosing the privacy implication (data becomes part of the conversation) and the handling of HEALTH_PRIVATE_FIELDS as empty cells. No contradiction with annotations.

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 description is somewhat long but each paragraph earns its place: purpose, privacy note, and comparison with read_health_data. It is front-loaded with the main action and uses structured paragraphs. Slightly verbose but not padded.

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?

For a tool that writes to disk and has privacy implications, the description covers all necessary aspects: side effects, return value (path and row count), difference from read_health_data, private field behavior, and privacy guidance. The output schema exists, so return format is already specified. An agent has everything needed to decide and call this tool 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?

The input schema provides 100% coverage: both start_date and end_date have clear descriptions with formatting and defaults. The description adds no new semantic detail about the parameters beyond 'date range', so it stays at the baseline for well-covered schemas.

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 description opens with a specific verb-resource pair: 'Write daily health metrics for a date range to a CSV file on disk, next to the database.' It clearly distinguishes itself from read_health_data by contrasting the output (file path vs. rows) and the row cap. An agent immediately knows what this tool does and how it differs from siblings.

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 explicitly names the alternative (read_health_data) and explains the differentiator: this tool is not capped at MAX_ROWS_RETURNED and avoids passing data through the model context. It also advises treating the export like pasting into a chat if the model is cloud-based. This gives the agent clear conditions for choosing this tool over alternatives.

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