Skip to main content
Glama

Query daily health metrics

query_health
Read-only

Retrieve Garmin health metrics over a date range as daily, weekly, or hourly tables with averages, totals, min/max, and 7/28-day trends to track sleep, steps, HRV, calories, and stress.

Instructions

For "how did I sleep this week", "calories and intensity minutes this week", "steps yesterday" or any single health metric over days: a table per day or per ISO week plus summary with averages, totals, min/max and 7/28-day trend. steps also returns the daily distance in km, resting_hr the daily min/max HR, hrv the Garmin HRV status and baseline range, calories the kcal burned (total, active) and eaten (calories_consumed_kcal, absent without food log entries), hydration the ml drunk, goal and sweat loss (days without a water entry are left out). Ask for several metrics in one call (e.g. calories and intensity_minutes together). Use get_sleep for sleep stages of particular nights. Example: {"metrics":["hrv","resting_hr","sleep"],"from":"2026-07-01","to":"2026-09-30","granularity":"week"}. "hour" gives hourly HR, stress, Body Battery, steps, respiration and SpO2 with peak and lowest hour and Body Battery events (sleep, activity, stress), for "when was I most stressed yesterday": {"metrics":["stress","body_battery"],"from":"2026-10-09","to":"2026-10-09","granularity":"hour"}.

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": {
      "metrics": "<metrics>"
    },
    "name": "query_health"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoDefault: today
fromNoDefault: 7 days before `to`
metricsYes
granularityNo"week" for ranges longer than ~3 weeks, "hour" for up to 3 daysday

Output Schema

NameRequiredDescriptionDefault
dataYes
metaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.0
    • addedOutput schema / properties / data / properties / summary / additionalProperties / properties / status_days
      Added value: +{
      +  "additionalProperties": {},
      +  "properties": {
      +    "balanced": {
      +      "type": "number"
      +    },
      +    "low": {
      +      "type": "number"
      +    },
      +    "no_status": {
      +      "type": "number"
      +    },
      +    "poor": {
      +      "type": "number"
      +    },
      +    "unbalanced": {
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed9 schema fields changedv0.7.0
    • changedInput schema / properties / granularity / description
      Previous value: -"\"week\" for ranges longer than ~3 weeks"New value: +"\"week\" for ranges longer than ~3 weeks, \"hour\" for up to 3 days"
    • changedInput schema / properties / granularity / enum
      Previous value: -[
      -  "day",
      -  "week"
      -]New value: +[
      +  "day",
      +  "week",
      +  "hour"
      +]
    • changedInput schema / properties / metrics / items / enum
      Previous value: -[
      -  "steps",
      -  "resting_hr",
      -  "hrv",
      -  "sleep",
      -  "stress",
      -  "body_battery",
      -  "respiration",
      -  "spo2",
      -  "intensity_minutes",
      -  "calories",
      -  "floors"
      -]New value: +[
      +  "steps",
      +  "resting_hr",
      +  "hrv",
      +  "sleep",
      +  "stress",
      +  "body_battery",
      +  "respiration",
      +  "spo2",
      +  "intensity_minutes",
      +  "calories",
      +  "floors",
      +  "hydration"
      +]
    • addedOutput schema / properties / data / properties / daily
      Added value: +{
      +  "items": {
      +    "additionalProperties": {
      +      "type": [
      +        "string",
      +        "number"
      +      ]
      +    },
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / data / properties / events
      Added value: +{
      +  "items": {
      +    "additionalProperties": {},
      +    "properties": {
      +      "body_battery_impact": {
      +        "type": "number"
      +      },
      +      "duration": {
      +        "type": "string"
      +      },
      +      "feedback": {
      +        "type": "string"
      +      },
      +      "start": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / data / properties / note
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / summary / additionalProperties / properties / hours_with_data
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / data / properties / summary / additionalProperties / properties / max_at
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / summary / additionalProperties / properties / min_at
      Added value: +{
      +  "type": "string"
      +}
  3. Changed1 schema field changedv0.6.2
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
  4. First observedv0.6.0

TDQS

A4.7/5.0
Behavior4/5

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

Beyond the readOnly/openWorld annotations, it discloses non-obvious data behaviours: days without a water entry are omitted, calories_consumed_kcal is absent without food-log entries, and hourly mode adds Body Battery events. Return-value detail is partly redundant with the existing output schema, which keeps this just short of 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?

The example queries are front-loaded so the agent sees trigger conditions immediately, and nearly every clause carries new information. The long single-paragraph run-on with dense parentheticals makes it harder to scan than a bulleted or sectioned layout would be.

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 4-parameter aggregating tool with an output schema, it covers everything needed: metric list semantics, granularity trade-offs, date-range defaults via examples, intra-day capability, and routing to the sibling for sleep stages. Nothing an agent needs to call it 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?

Schema coverage is 75%, and the description compensates by explaining what each metric value actually yields (steps adds distance in km, resting_hr adds daily min/max HR, hrv adds Garmin status and baseline range). It also reinforces the from/to and granularity semantics with two concrete call examples, adding meaning the schema enum alone does not convey.

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 concrete verb+resource (query health metrics over days), names the output shape (a table per day or per ISO week plus summary), and explicitly carves out the sleep-stages case to the get_sleep sibling. An agent can distinguish it from get_period_summary or get_sleep without opening the 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?

Leads with natural-language trigger phrasings ('how did I sleep this week', 'steps yesterday'), gives explicit granularity selection rules ('hour' for intra-day stress questions, 'week' for long ranges), and names the alternative tool (get_sleep) plus the condition for using it. It also advises batching multiple metrics into one call.

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