Skip to main content
Glama
Loopback Training Server

Loopback Training Server

get_health_metrics

Retrieve daily HealthKit metrics for a date range to assess recovery and readiness, correlating sleep, HRV, resting heart rate, weight, steps and energy with training patterns.

Instructions

Get daily health metrics synced from HealthKit.

One row per day. Which metrics a row carries varies by athlete — sleep, resting HR, HRV, respiratory rate, SpO2, sleeping wrist temperature, weight, body composition, VO2Max, steps and energy are all possible. Read the fields that are present rather than assuming a fixed set; a field that isn't there is not a zero, and not something to ask the athlete to start recording.

wrist_temperature is the Apple Watch's sleeping wrist temperature in °C, filed on the day the athlete woke up. The absolute figure means little and differs between people; what matters is the change against the athlete's own recent nights. A rise of about half a degree or more that lasts several nights often goes with illness (also with alcohol, a warm room, and the menstrual cycle), so read it alongside resting HR and HRV.

Where energy is present: active_energy_burned is movement + exercise (it already includes workout calories); basal_energy_burned is resting burn, and may be null on older app builds. Their sum is total daily expenditure. For anything comparing expenditure against intake, prefer get_nutrition_summary — it aligns both sides on the same periods and excludes days still in progress, which these raw rows do not.

Use these to correlate recovery/readiness with training patterns:

  • Low HRV + poor sleep → suggest an easier workout or a rest day

  • Declining resting HR trend → improving cardiovascular fitness

  • Weight/body composition trends alongside training volume

  • Steps and active energy alongside training load: how much of the day's movement was the session, and how much was the rest of life

Args: start_date: Start date (YYYY-MM-DD) end_date: End date (YYYY-MM-DD), defaults to today

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": {
      "start_date": "<start_date>"
    },
    "name": "get_health_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
end_dateNo
start_dateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.36

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden and does substantial work: rows are sparse and vary per athlete, an absent field is not zero and must not be queried of the athlete, `wrist_temperature` is in °C and filed on the wake-up day, `basal_energy_burned` may be null on older app builds, and these raw rows include days still in progress. It does not mention pagination, limits, or data-range ceilings, which keeps it from a 5.

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?

Structure is well front-loaded — what it returns, then row shape, then individual field caveats, then the alternative, then analytical use cases. The wrist-temperature paragraph is long and partly interpretive (illness, alcohol, menstrual cycle), but each sentence serves interpretation of the data rather than restating the name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must convey return shape, and it does: one row per day with a varying field set, plus explicit semantics for wrist_temperature and the two energy fields. The gap is that most metric field names are described in prose ('resting HR', 'HRV', 'steps') rather than as exact keys, so an agent still can't be fully certain what to read from a row.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the schema has no format or default documentation, so the definition compensates: start_date and end_date are given the YYYY-MM-DD format and end_date is documented as defaulting to today. It does not state whether the range is inclusive or how the two dates interact at boundaries, which is the remaining ambiguity.

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 opening sentence gives a specific verb and resource ('Get daily health metrics synced from HealthKit') and immediately pins the shape ('One row per day'), so an agent knows this is a per-day HealthKit read rather than a workout or plan lookup. It also names a sibling, get_nutrition_summary, for the intake-vs-expenditure case, which separates it from nearby tools 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit routing guidance ('For anything comparing expenditure against intake, prefer get_nutrition_summary') plus concrete analytical use cases (HRV/sleep, resting HR trends, steps vs training load). What's missing is a clear 'don't use this for X' boundary, e.g. intra-workout heart rate belongs to get_workout_heartrate — the agent must infer that.

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