Skip to main content
Glama
garmin-connect-api

garmin-connect-api

Get trend

get_trend
Read-onlyIdempotent

Track how a Garmin health metric moves across a date range with averages, extremes, and period-over-period change for steps, sleep, HRV, stress, body battery, weight, body fat, and VO2 max.

Instructions

How one metric moved over a range, with average, extremes and change.

Metrics: steps, resting_hr, sleep (hours), sleep_score, hrv, readiness (the morning score), stress (the day's average), body_battery (the day's high), weight, body_fat, vo2max (running), vo2max_cycling. Up to two months comes back daily, up to a year weekly, longer monthly. Ranges are limited to two years. Steps, sleep, sleep_score, stress and body_battery are fetched four weeks per Garmin request, so a year of one is about 14 requests; hrv, readiness and resting_hr a year per request; weight, body_fat and VO2 max one request.

For one day use get_day_summary or that metric's own tool; for every weigh-in rather than one a day, list_weigh_ins.

The summary gives days_with_data (periods_with_data for VO2 max, which Garmin groups itself), the average, min and max of the days, the first and last day, and change: the last whole period's average minus the first whole period's, so a week the range cuts short does not count. Steps, stress and body_battery keep adding up until midnight, so for those a range reaching today summarises the days before it: today stays in the points, and the summary names it under in_progress.

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": {
      "metric": "<metric>",
      "start": "<start>",
      "end": "<end>"
    },
    "name": "get_trend"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYesLast day, inclusive.
startYesFirst day, inclusive.
metricYesOne of the metrics listed above.
aggregationNoday, week or month. Chosen from the range when left out.

Output Schema

NameRequiredDescriptionDefault
endYes
unitYes
startYes
metricYes
pointsNo
summaryNo
aggregationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: discloses automatic granularity (daily to two months, weekly to a year, monthly beyond), a hard two-year range cap, per-metric request costs, the exact change computation (last whole period minus first whole period), and the in_progress behavior for partial-day metrics like steps and body_battery.

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 purpose followed by well-separated paragraphs for metrics, granularity/cost, alternatives and summary semantics. Dense but nearly every sentence carries actionable information; the per-metric request-count detail is the only part approaching excess, though it is useful for cost estimation.

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?

Complete for a read-only trend tool: metric semantics, granularity selection, range limits, cost implications and summary shape are all covered, and an output schema exists for the return values. Nothing needed 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?

The schema's metric description is circular ("One of the metrics listed above"), so the description supplies the real meaning for each enum value, e.g. readiness is the morning score, stress is the day's average, body_battery is the day's high. It also explains that aggregation is inferred from the range when omitted, and confirms start/end are inclusive.

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?

Opens with a precise statement of verb and resource: how one metric moved over a range, returning average, extremes and change. Distinct from get_day_summary, list_weigh_ins and per-metric tools, which it names explicitly.

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?

"For one day use get_day_summary or that metric's own tool; for every weigh-in rather than one a day, list_weigh_ins" gives explicit alternatives and the condition that selects each. It also implies when this tool is the right choice (multi-day/aggregated views).

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