Log a raw measurement
log_measurementRecord a single timestamped observation—one metric, value, and source—when exact time or multiple same-day readings matter. Use it for point-in-time health data instead of end-of-day summaries.
Instructions
Record a single raw observation — one metric, one value, one point in time — rather than a whole day's summary. Use this instead of log_daily_metric when the source, exact time, or the fact that there were multiple readings that day matters (e.g. three separate workouts, or a wearable's periodic heart-rate samples).
Use this tool when:
recording one timestamped observation where the exact time, source, or possibility of multiple same-day readings matters (e.g. "record my blood pressure reading from my cuff at 7am").
Do not use this tool when:
it's just a single end-of-day value for a fixed metric -> use
log_daily_metricinstead.it's a workout/exercise session -> use
log_workout_sessioninstead.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"timestamp": "<timestamp>",
"metric": "<metric>",
"value": "<value>"
},
"name": "log_measurement"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Unit the value is in, e.g. "bpm", "kg". Optional. If provided, must match the metric's canonical unit (case-insensitive); convert the reading to that canonical unit before logging. | |
| value | Yes | The numeric reading. | |
| metric | Yes | Name of the metric, e.g. "resting_heart_rate", "steps". Not free-form: must already have an entry in the aggregation_rules table (steps, sleep_hours, resting_heart_rate, weight_kg, workout_minutes, mood, water_ml, heart_rate, hrv_ms, out of the box) — daily_metrics is a database-maintained projection over measurements (see db/schema.sql), so every metric written to it needs a known aggregation method (sum/mean/last) or there would be nothing telling the projection how to roll same-day readings up. metrics_schema lists the current set. | |
| source | No | Where this came from, e.g. "Apple Watch", "manual". Optional. | |
| timestamp | Yes | When the observation was taken, YYYY-MM-DD or a full ISO 8601 timestamp (YYYY-MM-DDTHH:MM:SS). Give local wall-clock time. A numeric UTC offset (e.g. -08:00) is dropped before storing, so the reading belongs to the day written in the timestamp; a trailing "Z" is kept and counts as UTC. | |
| source_type | No | Category of source, e.g. "wearable", "manual", "app". Optional. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| measurement | Yes |