Skip to main content
Glama
Quantified Self MCP Server

Quantified Self MCP Server

Log a daily metric

log_daily_metric
DestructiveIdempotent

Record one or more health metrics for a single day, creating that day's entry if it does not exist while leaving unprovided metrics untouched.

Instructions

Record one or more health metrics for a single day, creating that day's row if it doesn't already have one.

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.

Only the metrics you pass are written — anything left as null is not touched, so logging just today's mood doesn't erase today's steps if they were set earlier. To undo a value logged by mistake, use clear_metric rather than trying to overwrite it with a placeholder. Use this for a simple day-level value for one of the nine fixed metrics below.

Do not use this tool when:

  • the observation needs its own timestamp/source, or the day may have more than one reading of the same metric -> use log_measurement instead.

  • it's a workout/exercise session -> use log_workout_session instead (workout_minutes here is just the daily total, not the session itself).

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": {
      "date": "<date>"
    },
    "name": "log_daily_metric"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesThe day to log, formatted YYYY-MM-DD.
moodNoMood rating on a 1-10 scale.
stepsNoStep count for the day. 0-200,000.
hrv_msNoHeart rate variability in milliseconds. 0-300.
water_mlNoWater intake in millilitres. 0-10,000.
weight_kgNoBody weight in kilograms. 1-500.
heart_rateNoNon-resting heart rate reading in bpm. 20-250.
sleep_hoursNoHours of sleep. 0-24.
workout_minutesNoMinutes of exercise. 0-1,440.
resting_heart_rateNoResting heart rate in bpm. 20-250.

Output Schema

NameRequiredDescriptionDefault
rowYes
loggedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changedv1.0.16
    • addedInput schema / properties / date / description
      Added value: +"The day to log, formatted YYYY-MM-DD."
    • addedInput schema / properties / heart_rate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Non-resting heart rate reading in bpm. 20-250."
      +}
    • addedInput schema / properties / hrv_ms
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Heart rate variability in milliseconds. 0-300."
      +}
    • addedInput schema / properties / mood
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Mood rating on a 1-10 scale."
      +}
    • addedInput schema / properties / resting_heart_rate / description
      Added value: +"Resting heart rate in bpm. 20-250."
    • addedInput schema / properties / sleep_hours / description
      Added value: +"Hours of sleep. 0-24."
    • addedInput schema / properties / steps / description
      Added value: +"Step count for the day. 0-200,000."
    • addedInput schema / properties / water_ml
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Water intake in millilitres. 0-10,000."
      +}
    • addedInput schema / properties / weight_kg
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Body weight in kilograms. 1-500."
      +}
    • addedInput schema / properties / workout_minutes
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Minutes of exercise. 0-1,440."
      +}
    • addedOutput schema / properties / logged
      Added value: +{
      +  "additionalProperties": {
      +    "anyOf": [
      +      {
      +        "type": "integer"
      +      },
      +      {
      +        "type": "number"
      +      }
      +    ]
      +  },
      +  "type": "object"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / row
      Added value: +{
      +  "properties": {
      +    "date": {
      +      "type": "string"
      +    },
      +    "heart_rate": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "hrv_ms": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "mood": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "resting_heart_rate": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "sleep_hours": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "steps": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "water_ml": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "weight_kg": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "workout_minutes": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    }
      +  },
      +  "required": [
      +    "date"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "logged",
      +  "row"
      +]
    • removedOutput schema / x-fastmcp-wrap-result
      Removed value: -true
  2. Changed15 schema fields changedv1.0.15
    • removedInput schema / properties / date / description
      Removed value: -"The day to log, formatted YYYY-MM-DD."
    • removedInput schema / properties / heart_rate
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "integer"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Non-resting heart rate reading in bpm. 20-250."
      -}
    • removedInput schema / properties / hrv_ms
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Heart rate variability in milliseconds. 0-300."
      -}
    • removedInput schema / properties / mood
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "integer"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Mood rating on a 1-10 scale."
      -}
    • removedInput schema / properties / resting_heart_rate / description
      Removed value: -"Resting heart rate in bpm. 20-250."
    • removedInput schema / properties / sleep_hours / description
      Removed value: -"Hours of sleep. 0-24."
    • removedInput schema / properties / steps / description
      Removed value: -"Step count for the day. 0-200,000."
    • removedInput schema / properties / water_ml
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "integer"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Water intake in millilitres. 0-10,000."
      -}
    • removedInput schema / properties / weight_kg
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "number"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Body weight in kilograms. 1-500."
      -}
    • removedInput schema / properties / workout_minutes
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "integer"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Minutes of exercise. 0-1,440."
      -}
    • removedOutput schema / properties / logged
      Removed value: -{
      -  "additionalProperties": {
      -    "anyOf": [
      -      {
      -        "type": "integer"
      -      },
      -      {
      -        "type": "number"
      -      }
      -    ]
      -  },
      -  "type": "object"
      -}
    • addedOutput schema / properties / result
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / row
      Removed value: -{
      -  "properties": {
      -    "date": {
      -      "type": "string"
      -    },
      -    "heart_rate": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null
      -    },
      -    "hrv_ms": {
      -      "anyOf": [
      -        {
      -          "type": "number"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null
      -    },
      -    "mood": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null
      -    },
      -    "resting_heart_rate": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null
      -    },
      -    "sleep_hours": {
      -      "anyOf": [
      -        {
      -          "type": "number"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null
      -    },
      -    "steps": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null
      -    },
      -    "water_ml": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null
      -    },
      -    "weight_kg": {
      -      "anyOf": [
      -        {
      -          "type": "number"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null
      -    },
      -    "workout_minutes": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null
      -    }
      -  },
      -  "required": [
      -    "date"
      -  ],
      -  "type": "object"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "logged",
      -  "row"
      -]New value: +[
      +  "result"
      +]
    • addedOutput schema / x-fastmcp-wrap-result
      Added value: +true
  3. Changed4 schema fields changedv1.0.11
    • addedInput schema / properties / heart_rate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Non-resting heart rate reading in bpm. 20-250."
      +}
    • addedInput schema / properties / hrv_ms
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Heart rate variability in milliseconds. 0-300."
      +}
    • addedOutput schema / properties / row / properties / heart_rate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / row / properties / hrv_ms
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  4. Changed5 schema fields changedv1.0.8
    • addedOutput schema / properties / logged
      Added value: +{
      +  "additionalProperties": {
      +    "anyOf": [
      +      {
      +        "type": "integer"
      +      },
      +      {
      +        "type": "number"
      +      }
      +    ]
      +  },
      +  "type": "object"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / row
      Added value: +{
      +  "properties": {
      +    "date": {
      +      "type": "string"
      +    },
      +    "mood": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "resting_heart_rate": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "sleep_hours": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "steps": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "water_ml": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "weight_kg": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "workout_minutes": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    }
      +  },
      +  "required": [
      +    "date"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "logged",
      +  "row"
      +]
    • removedOutput schema / x-fastmcp-wrap-result
      Removed value: -true
  5. Addedv1.0.4

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag a non-read-only, idempotent, destructive write, and the description goes well beyond them: it explains that only non-null metrics are written so earlier values survive, that clear_metric is the correct undo path rather than placeholder overwrites, and it discloses the privacy consequence that returned data enters the model conversation context. These are non-obvious behavioral facts an agent could not infer from the annotations or schema.

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, the partial-write rule, the undo path, and the exclusion list are all front-loaded before the privacy caveat, so the most important routing information comes first. The privacy paragraph is somewhat long and could be tightened, but it carries information not stated elsewhere.

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 10-parameter upsert tool with an output schema (so return values need no explanation), the description covers purpose, field semantics, sibling routing, undo, and a data-exposure caveat. Nothing an agent needs to call it safely or correctly 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 the baseline is 3, but the description adds real meaning: the null values are load-bearing ('anything left as null is not touched'), which the schema's bare default:null does not convey, and it frames the fields as nine fixed day-level metrics. That partial-write contract materially changes how an agent should populate the parameters.

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 one or more health metrics for a single day') plus upsert semantics ('creating that day's row if it doesn't already have one'). It explicitly distinguishes itself from log_measurement, log_workout_session and clear_metric, so an agent can route correctly without opening schemas.

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?

Contains an explicit 'Do not use this tool when' block naming two alternatives and the exact conditions that select them (per-observation timestamps/source, multiple readings per day, workout sessions), plus a pointer to clear_metric for undo. This is the full when/when-not/alternative triad.

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