Skip to main content
Glama

Recovery vs running performance

analyze_recovery_impact
Read-onlyIdempotent

Compare runs after strong vs poor sleep, HRV, or Body Battery at matched heart rate to show whether recovery affects running pace.

Instructions

Does sleep, HRV or Body Battery relate to how the user runs? Pairs each run with the night before it (sleep score, hours slept, overnight HRV) and that morning's Body Battery, then compares runs after the best third of nights with runs after the worst third at the same heart rate: it fits the user's own speed-for-HR line across the runs and scores each run by how much faster or slower it was than expected for its HR, so easy and hard runs compare fairly. Returns each group's average HR and pace, the difference in s/km (or s/mi) at the same HR, and a correlation, called meaningful only at |r| >= 0.3 with 8+ runs per group. Warns when the groups' average HR differs by over 8 bpm (different kinds of runs). Races, runs under 20 minutes and manual entries are left out. Use for 'does poor sleep hurt my running', 'do I run better when my HRV is high'. Says when there's too little data to conclude; correlation, not proof. Defaults to the last 180 days and running; range up to 366 days.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "analyze_recovery_impact"
  }
}

Input Schema

NameRequiredDescriptionDefault
unitNoPace unit. Defaults to the user's Garmin unit setting.
periodNoNamed period resolved in the user's time zone (weeks start Monday). Use instead of start_date/end_date.
measureNoRecovery measure to compare by; 'all' does each. Pick one for a faster answer.all
end_dateNoLast day, YYYY-MM-DD, inclusive. Defaults to today.
start_dateNoFirst day, YYYY-MM-DD, inclusive. Defaults to 180 days ago.
activity_typeNoParent type key, e.g. running, cycling, walking.running

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, non-destructive, open-world behavior; the description adds substantial behavior beyond that: pairing logic, best/worst third grouping, speed-for-HR residualization, |r|>=0.3 threshold with 8+ runs per group, >8 bpm HR-difference warning, exclusions, and low-data caveat. It does not discuss auth or rate limits, but for a read-only analysis tool this is very transparent.

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 paragraph is information-dense and front-loads the purpose and method, with no obvious filler. However, it is a long run-on block that could be easier to scan with separate sentences or bullets for returns, warnings, and exclusions.

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 complex analysis tool with six optional params and no output schema, the description explains the return values (group averages, pace difference at same HR, correlation), decision thresholds, exclusions, and low-data caveats. That is complete enough for an agent to invoke and interpret the result correctly.

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 coverage is 100%, so the schema already documents all six parameters and their enums/defaults. The description repeats the 180-day/running defaults and adds a 366-day range cap, but it does not add much about unit, period, or measure semantics beyond the schema.

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 description states a specific analytic question and method: pairing each run with the prior night's sleep/HRV/Body Battery, comparing best-third vs worst-third nights at the same HR, and scoring residuals against the user's own speed-for-HR line. That is clearly an analysis tool, distinct from the raw sleep, HRV, Body Battery, and activity getters in the sibling list.

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 concrete example questions ('does poor sleep hurt my running', 'do I run better when my HRV is high'), notes the default window/activity and the 366-day cap, and states which runs are excluded. It does not explicitly name an alternative sibling or a 'do not use this for X' condition, so the routing guidance is strong but not fully exhaustive.

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