Skip to main content
Glama

Get personal baselines (sleep, HRV, recovery, steps)

get_baselines
Read-only

Compute personal baselines from recent Suunto days for sleep, HRV, recovery, and steps to judge whether a target date is below, within, or above the user's normal range.

Instructions

Your own recent norms, so a day can be judged against them: the band of the user's last days days (default 28) for sleep duration, sleep score, HRV, recovery on waking, the day's lowest recovery and steps, and where the judged date sits in it. The baseline window is the days days BEFORE date (date-days to date-1); date itself is never part of its own baseline. Per day: sleepDurationS, sleepScore and hrv (AvgHRV) come from the main sleep of the night that led INTO that day (as in get_daily_snapshot; sleep shorter than about 3 h is filed by Suunto as a nap and does not count, so that day has no value), recoveryMorning is the Balance nearest the main sleep's end, recoveryLow the lowest Balance of the local day (Balance x100 equals the watch's Resources %), steps the day's step count. A day without data has no value and is never counted as 0. Output (compact JSON; seconds whole, Balance 2 decimals, everything else 1): { date, from, to, days, metrics: { : { n (days with a value in the window), median, p25, p75, last7Median, latest, latestVsBand } }, notes, errors }. median, p25 and p75 are quantiles by linear interpolation between order statistics (position (n-1)*p in the sorted values; the median of an even n is the mean of the two middle values), and all three are null when n < 7 (too little data; notes says so). last7Median is the median of the last 7 days of the window, null with fewer than 4 values. latest is the value for date itself, null when missing; for steps and recoveryLow it is always null because that day is still running. latestVsBand is 'below' | 'within' | 'above' relative to [p25, p75] (the edges count as within), null when latest or the band is null. The band is the middle half of the user's own last N days, not a medical reference. One request each for sleep and recovery over the whole span; activity is read in pieces of up to 28 days (Suunto's limit for daily statistics), so 90 days cost 6 requests; a section that fails leaves its metrics empty and is listed in errors: [{ section, error }]. Read-only.

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": "get_baselines"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesThe local calendar day YYYY-MM-DD being judged against the baseline. Today works: its night may still be in progress and the watch may not have synced yet.
daysNoLength of the baseline window in days, ending the day before `date` (default 28).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.23.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, yet the description goes far beyond them: it discloses request cost and paging limits ('activity is read in pieces of up to 28 days... 90 days cost 6 requests'), partial-failure behavior ('a section that fails leaves its metrics empty and is listed in errors'), and how missing data is treated ('no value and is never counted as 0', naps under ~3h excluded). This is exactly the kind of operational context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first clause, but everything after is one dense paragraph mixing data provenance, quantile math, output field definitions, and API cost. Given there is no output schema, documenting the return shape is justified, but the interpolation formula and per-field null rules make it heavy to scan and could be trimmed or structured without losing information.

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 two-parameter read-only statistics tool with no output schema, the description covers provenance for every metric, null semantics (n, latest, latestVsBand, quantile thresholds), error reporting shape, and request budget. Nothing an agent needs to call it correctly or interpret the response is left inferable.

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 100% and both params already carry descriptions, so the baseline is 3. The description earns an increment by making the window boundary logic unambiguous ('the `days` days BEFORE `date` (date-days to date-1); `date` itself is never part of its own baseline'), which tightens the schema's looser 'ending the day before' phrasing and removes an off-by-one 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?

Opens with a specific framing ('Your own recent norms, so a day can be judged against them') and then enumerates exactly which metrics the baseline covers (sleep duration, sleep score, HRV, recovery on waking, day-low recovery, steps) and what the output band represents. It also anchors itself to a sibling ('as in get_daily_snapshot') so the agent knows where the underlying semantics come from.

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?

The use case is clear and gives the agent a decision rule: use this to judge a specific `date` against the user's own recent band, and it explicitly disclaims that the band is 'not a medical reference' (guarding against misuse). It does not, however, name the alternatives it competes with (get_recovery, list_recovery, get_daily_snapshot) or state when not to use it, so there is no explicit routing between siblings.

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