Skip to main content
Glama
Thecimal

Quantified Self MCP Server

Get metric history

get_metric_history
Read-onlyIdempotent

Read one metric's day-by-day values, without the other six metrics read_health_data always includes. Use this when you only care about a single metric (e.g.

Instructions

Read one metric's day-by-day values, without the other six metrics read_health_data always includes. Use this when you only care about a single metric (e.g. before calling get_baseline or calculate_metric_trend yourself) and don't need the full multi-metric payload.

Use this tool when:

  • the user wants one specific metric's history/trend over time (e.g. "show my weight over the last 30 days", "how has resting heart rate changed this month").

Do not use this tool when:

  • the request is broad/general, across multiple metrics at once -> use read_health_data 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

NameRequiredDescriptionDefault
metricYesOne of steps, sleep_hours, resting_heart_rate, weight_kg, workout_minutes, mood, water_ml, heart_rate, hrv_ms. Rejected if configured as private via HEALTH_PRIVATE_FIELDS.
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.

Output Schema

NameRequiredDescriptionDefault
rangeYes
metricYes
pointsYes
evidenceYesCoverage/quality of the data a single-metric analytical result is based on. See evidence.build_evidence for how each field is computed.
data_healthNoWhether this history is complete, current and trustworthy; see DataHealth.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.30
    • changedOutput schema / properties / data_health / anyOf
      Previous value: -[
      -  {
      -    "description": "Data-quality state behind one result (not a medical or statistical confidence score). status is one of\nVALID, VALID_WITH_GAPS, INSUFFICIENT_DATA, STALE, IMPORT_INCOMPLETE; reasons lists every condition that\napplies. See data_health.compose_data_health for how it is decided.",
      -    "properties": {
      -      "completeness": {
      -        "properties": {
      -          "coverage_ratio": {
      -            "type": "number"
      -          },
      -          "expected_days": {
      -            "type": "integer"
      -          },
      -          "missing_days": {
      -            "type": "integer"
      -          },
      -          "observed_days": {
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "expected_days",
      -          "observed_days",
      -          "coverage_ratio",
      -          "missing_days"
      -        ],
      -        "type": "object"
      -      },
      -      "coverage": {
      -        "properties": {
      -          "end": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null
      -          },
      -          "requested_end": {
      -            "type": "string"
      -          },
      -          "requested_start": {
      -            "type": "string"
      -          },
      -          "start": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null
      -          }
      -        },
      -        "required": [
      -          "requested_start",
      -          "requested_end"
      -        ],
      -        "type": "object"
      -      },
      -      "freshness": {
      -        "properties": {
      -          "age_days": {
      -            "anyOf": [
      -              {
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "Days from the latest observation to the end of the requested window."
      -          },
      -          "dataset_days_behind": {
      -            "anyOf": [
      -              {
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "Days from the dataset's latest data (any metric) to today."
      -          },
      -          "latest_data": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "gaps": {
      -        "items": {
      -          "properties": {
      -            "days": {
      -              "type": "integer"
      -            },
      -            "end": {
      -              "type": "string"
      -            },
      -            "start": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "start",
      -            "end",
      -            "days"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "last_import": {
      -        "anyOf": [
      -          {
      -            "properties": {
      -              "finished_at": {
      -                "anyOf": [
      -                  {
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "default": null
      -              },
      -              "importer": {
      -                "type": "string"
      -              },
      -              "source_file": {
      -                "anyOf": [
      -                  {
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "default": null
      -              },
      -              "status": {
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "importer",
      -              "status"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "last_successful_import": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "observations": {
      -        "description": "Number of daily values the result is computed from.",
      -        "type": "integer"
      -      },
      -      "reasons": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "status": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "reasons",
      -      "freshness",
      -      "coverage",
      -      "completeness",
      -      "gaps",
      -      "observations"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Data-quality state behind one result (not a medical or statistical confidence score). status is one of\nVALID, VALID_WITH_GAPS, MIXED_SOURCES, INSUFFICIENT_DATA, STALE, IMPORT_INCOMPLETE; reasons lists every\ncondition that\napplies. See data_health.compose_data_health for how it is decided.",
      +    "properties": {
      +      "completeness": {
      +        "properties": {
      +          "coverage_ratio": {
      +            "type": "number"
      +          },
      +          "expected_days": {
      +            "type": "integer"
      +          },
      +          "missing_days": {
      +            "type": "integer"
      +          },
      +          "observed_days": {
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "expected_days",
      +          "observed_days",
      +          "coverage_ratio",
      +          "missing_days"
      +        ],
      +        "type": "object"
      +      },
      +      "coverage": {
      +        "properties": {
      +          "end": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null
      +          },
      +          "requested_end": {
      +            "type": "string"
      +          },
      +          "requested_start": {
      +            "type": "string"
      +          },
      +          "start": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null
      +          }
      +        },
      +        "required": [
      +          "requested_start",
      +          "requested_end"
      +        ],
      +        "type": "object"
      +      },
      +      "freshness": {
      +        "properties": {
      +          "age_days": {
      +            "anyOf": [
      +              {
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "Days from the latest observation to the end of the requested window."
      +          },
      +          "dataset_days_behind": {
      +            "anyOf": [
      +              {
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "Days from the dataset's latest data (any metric) to today."
      +          },
      +          "latest_data": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "gaps": {
      +        "items": {
      +          "properties": {
      +            "days": {
      +              "type": "integer"
      +            },
      +            "end": {
      +              "type": "string"
      +            },
      +            "start": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "start",
      +            "end",
      +            "days"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "last_import": {
      +        "anyOf": [
      +          {
      +            "properties": {
      +              "finished_at": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null
      +              },
      +              "importer": {
      +                "type": "string"
      +              },
      +              "source_file": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null
      +              },
      +              "status": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "importer",
      +              "status"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "last_successful_import": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "observations": {
      +        "description": "Number of daily values the result is computed from.",
      +        "type": "integer"
      +      },
      +      "reasons": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "status": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "reasons",
      +      "freshness",
      +      "coverage",
      +      "completeness",
      +      "gaps",
      +      "observations"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed1 schema field changedv1.0.29
    • addedOutput schema / properties / data_health
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Data-quality state behind one result (not a medical or statistical confidence score). status is one of\nVALID, VALID_WITH_GAPS, INSUFFICIENT_DATA, STALE, IMPORT_INCOMPLETE; reasons lists every condition that\napplies. See data_health.compose_data_health for how it is decided.",
      +      "properties": {
      +        "completeness": {
      +          "properties": {
      +            "coverage_ratio": {
      +              "type": "number"
      +            },
      +            "expected_days": {
      +              "type": "integer"
      +            },
      +            "missing_days": {
      +              "type": "integer"
      +            },
      +            "observed_days": {
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "expected_days",
      +            "observed_days",
      +            "coverage_ratio",
      +            "missing_days"
      +          ],
      +          "type": "object"
      +        },
      +        "coverage": {
      +          "properties": {
      +            "end": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null
      +            },
      +            "requested_end": {
      +              "type": "string"
      +            },
      +            "requested_start": {
      +              "type": "string"
      +            },
      +            "start": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null
      +            }
      +          },
      +          "required": [
      +            "requested_start",
      +            "requested_end"
      +          ],
      +          "type": "object"
      +        },
      +        "freshness": {
      +          "properties": {
      +            "age_days": {
      +              "anyOf": [
      +                {
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "Days from the latest observation to the end of the requested window."
      +            },
      +            "dataset_days_behind": {
      +              "anyOf": [
      +                {
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "Days from the dataset's latest data (any metric) to today."
      +            },
      +            "latest_data": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "gaps": {
      +          "items": {
      +            "properties": {
      +              "days": {
      +                "type": "integer"
      +              },
      +              "end": {
      +                "type": "string"
      +              },
      +              "start": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "start",
      +              "end",
      +              "days"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "last_import": {
      +          "anyOf": [
      +            {
      +              "properties": {
      +                "finished_at": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null
      +                },
      +                "importer": {
      +                  "type": "string"
      +                },
      +                "source_file": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null
      +                },
      +                "status": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "importer",
      +                "status"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "last_successful_import": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "observations": {
      +          "description": "Number of daily values the result is computed from.",
      +          "type": "integer"
      +        },
      +        "reasons": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "status": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "status",
      +        "reasons",
      +        "freshness",
      +        "coverage",
      +        "completeness",
      +        "gaps",
      +        "observations"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Whether this history is complete, current and trustworthy; see DataHealth."
      +}
  3. Changed2 schema fields changed
    • addedOutput schema / properties / evidence
      Added value: +{
      +  "description": "Coverage/quality of the data a single-metric analytical result is\nbased on. See evidence.build_evidence for how each field is computed.",
      +  "properties": {
      +    "confidence": {
      +      "type": "string"
      +    },
      +    "coverage_ratio": {
      +      "type": "number"
      +    },
      +    "expected_days": {
      +      "type": "integer"
      +    },
      +    "freshness_days": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "gaps": {
      +      "items": {
      +        "properties": {
      +          "days": {
      +            "type": "integer"
      +          },
      +          "end": {
      +            "type": "string"
      +          },
      +          "start": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end",
      +          "days"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "measurement_count": {
      +      "type": "integer"
      +    },
      +    "missing_days": {
      +      "type": "integer"
      +    },
      +    "observed_days": {
      +      "type": "integer"
      +    },
      +    "observed_end": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "observed_start": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null
      +    },
      +    "recent_gap_days": {
      +      "type": "integer"
      +    },
      +    "requested_end": {
      +      "type": "string"
      +    },
      +    "requested_start": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "requested_start",
      +    "requested_end",
      +    "expected_days",
      +    "observed_days",
      +    "coverage_ratio",
      +    "missing_days",
      +    "measurement_count",
      +    "gaps",
      +    "recent_gap_days",
      +    "confidence"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "metric",
      -  "range",
      -  "points"
      -]New value: +[
      +  "metric",
      +  "range",
      +  "points",
      +  "evidence"
      +]
  4. Addedv1.0.16
  5. Removedv1.0.15
  6. 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 readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely non-obvious context: the payload is single-metric only, and a privacy note explains that returned data enters the conversation and may leave the machine if the client model is cloud-hosted — a trait found nowhere in the structured fields.

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 distinction from read_health_data, then cleanly structured as when/when-not bullets. The four-sentence privacy note is unusually verbose relative to the rest and dilutes an otherwise tight definition.

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 read-only, single-metric query with full parameter documentation, rich annotations and a declared output schema, the description covers everything an agent needs: scope, alternatives, and a data-handling caveat. Return-value details are correctly left to the output schema.

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 the schema already documents metric, start_date and end_date with formats, defaults and the private-field rejection rule. The description adds no parameter-level syntax or semantics beyond what the schema provides, which is the expected baseline.

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 ('Read one metric's day-by-day values') and immediately contrasts scope with the sibling read_health_data, which 'always includes' the other six metrics. An agent can distinguish the two without opening either 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 when-to-use section with concrete example utterances ('show my weight over the last 30 days') and an explicit when-not section naming the alternative tool (read_health_data) for broad multi-metric requests. Routing is unambiguous.

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