Skip to main content
Glama
Thecimal

Quantified Self MCP Server

Log a raw measurement

log_measurement

Record one timestamped metric value when exact time, source, or multiple same-day readings matter. Use it for raw observations instead of daily 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_metric instead.

  • it's a workout/exercise session -> use log_workout_session instead.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitNoUnit the value is in, e.g. "bpm", "kg". Optional.
valueYesThe numeric reading.
metricYesName 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.
sourceNoWhere this came from, e.g. "Apple Watch", "manual". Optional.
timestampYesWhen the observation was taken, YYYY-MM-DD or a full ISO 8601 timestamp (YYYY-MM-DDTHH:MM:SS).
source_typeNoCategory of source, e.g. "wearable", "manual", "app". Optional.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
measurementYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.29
    • addedOutput schema / properties / measurement / properties / value / anyOf
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / measurement / properties / value / type
      Removed value: -"number"
  2. Changed1 schema field changedv1.0.19
    • changedInput schema / properties / metric / description
      Previous value: -"Name of the metric, e.g. \"resting_heart_rate\", \"steps\".\nFree-form — not limited to daily_metrics' fixed columns."New value: +"Name of the metric, e.g. \"resting_heart_rate\", \"steps\".\nNot free-form: must already have an entry in the\naggregation_rules table (steps, sleep_hours,\nresting_heart_rate, weight_kg, workout_minutes, mood,\nwater_ml, heart_rate, hrv_ms, out of the box) — daily_metrics\nis a database-maintained projection over measurements (see\ndb/schema.sql), so every metric written to it needs a known\naggregation method (sum/mean/last) or there would be nothing\ntelling the projection how to roll same-day readings up.\nmetrics_schema lists the current set."
  3. Changed14 schema fields changedv1.0.16
    • removedInput schema / properties / date
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / metric
      Added value: +{
      +  "description": "Name of the metric, e.g. \"resting_heart_rate\", \"steps\".\nFree-form — not limited to daily_metrics' fixed columns.",
      +  "type": "string"
      +}
    • removedInput schema / properties / metric_name
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / notes
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • addedInput schema / properties / source
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Where this came from, e.g. \"Apple Watch\", \"manual\". Optional."
      +}
    • addedInput schema / properties / source_type
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Category of source, e.g. \"wearable\", \"manual\", \"app\". Optional."
      +}
    • addedInput schema / properties / timestamp
      Added value: +{
      +  "description": "When the observation was taken, YYYY-MM-DD or a full\nISO 8601 timestamp (YYYY-MM-DDTHH:MM:SS).",
      +  "type": "string"
      +}
    • addedInput schema / properties / unit / description
      Added value: +"Unit the value is in, e.g. \"bpm\", \"kg\". Optional."
    • addedInput schema / properties / value / description
      Added value: +"The numeric reading."
    • changedInput schema / required
      Previous value: -[
      -  "date",
      -  "metric_name",
      -  "value"
      -]New value: +[
      +  "timestamp",
      +  "metric",
      +  "value"
      +]
    • addedOutput schema / properties / measurement
      Added value: +{
      +  "properties": {
      +    "created_at": {
      +      "type": "string"
      +    },
      +    "id": {
      +      "type": "integer"
      +    },
      +    "metric": {
      +      "type": "string"
      +    },
      +    "source": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "source_type": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "timestamp": {
      +      "type": "string"
      +    },
      +    "unit": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "value": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "timestamp",
      +    "metric",
      +    "value",
      +    "created_at"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "type": "string"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "measurement"
      +]
    • removedOutput schema / x-fastmcp-wrap-result
      Removed value: -true
  4. Changed14 schema fields changedv1.0.15
    • addedInput schema / properties / date
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / metric
      Removed value: -{
      -  "description": "Name of the metric, e.g. \"resting_heart_rate\", \"steps\".\nFree-form — not limited to daily_metrics' fixed columns.",
      -  "type": "string"
      -}
    • addedInput schema / properties / metric_name
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / notes
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • removedInput schema / properties / source
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Where this came from, e.g. \"Apple Watch\", \"manual\". Optional."
      -}
    • removedInput schema / properties / source_type
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Category of source, e.g. \"wearable\", \"manual\", \"app\". Optional."
      -}
    • removedInput schema / properties / timestamp
      Removed value: -{
      -  "description": "When the observation was taken, YYYY-MM-DD or a full\nISO 8601 timestamp (YYYY-MM-DDTHH:MM:SS).",
      -  "type": "string"
      -}
    • removedInput schema / properties / unit / description
      Removed value: -"Unit the value is in, e.g. \"bpm\", \"kg\". Optional."
    • removedInput schema / properties / value / description
      Removed value: -"The numeric reading."
    • changedInput schema / required
      Previous value: -[
      -  "timestamp",
      -  "metric",
      -  "value"
      -]New value: +[
      +  "date",
      +  "metric_name",
      +  "value"
      +]
    • removedOutput schema / properties / measurement
      Removed value: -{
      -  "properties": {
      -    "created_at": {
      -      "type": "string"
      -    },
      -    "id": {
      -      "type": "integer"
      -    },
      -    "metric": {
      -      "type": "string"
      -    },
      -    "source": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null
      -    },
      -    "source_type": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null
      -    },
      -    "timestamp": {
      -      "type": "string"
      -    },
      -    "unit": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null
      -    },
      -    "value": {
      -      "type": "number"
      -    }
      -  },
      -  "required": [
      -    "id",
      -    "timestamp",
      -    "metric",
      -    "value",
      -    "created_at"
      -  ],
      -  "type": "object"
      -}
    • addedOutput schema / properties / result
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "measurement"
      -]New value: +[
      +  "result"
      +]
    • addedOutput schema / x-fastmcp-wrap-result
      Added value: +true
  5. Addedv1.0.11

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnlyHint=false, idempotentHint=false, openWorldHint=false), so the bar is lower. The description still adds genuinely non-obvious context the annotations cannot carry: the privacy disclosure that returned data enters the conversation sent to the calling client's model. It does not, however, discuss duplicate/repeat handling, which the idempotentHint=false annotation implies is a real concern for a timestamped-observation writer.

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?

Front-loaded with the core purpose and the sibling contrast, and the when/when-not bullets are scannable. The 'Use this tool when' bullet largely restates the opening paragraph, and the multi-sentence privacy note, while valuable, is disproportionately long for a logging tool.

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?

Given an output schema exists, return values need not be explained. The description covers selection criteria, exclusions, sibling routing, the metric-name constraint, and a privacy caveat — everything an agent needs to invoke this 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%, so every parameter (unit, value, metric, source, timestamp, source_type) is already documented in the schema, including the aggregation_rules constraint on metric. The description adds no format or constraint detail beyond what the schema provides, so the 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 and resource ('Record a single raw observation — one metric, one value, one point in time') and immediately contrasts it with the daily-summary alternative. An agent can distinguish it from log_daily_metric and log_workout_session 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?

Explicit 'Use this tool when' and 'Do not use this tool when' sections, each with concrete examples ('three separate workouts', 'record my blood pressure reading from my cuff at 7am') and named alternatives (log_daily_metric, log_workout_session). This is about as complete as routing guidance gets.

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