Skip to main content
Glama
durely
by durely

Analyze an activity

garmin_analyze_activity
Read-onlyIdempotent

Computes heart rate and power zone time, normalized power, TSS, aerobic decoupling, first/second-half splits, best efforts, TRIMP, and work intervals from one Garmin activity's FIT data.

Instructions

Compute training metrics for one activity from its second-by-second FIT data:

  • time in heart rate zones (the user's Garmin zones for that sport) and, with an FTP, in power zones (Coggan)

  • power: average, normalized power (NP), variability index, intensity factor and TSS (needs FTP)

  • aerobic decoupling: drift of power or pace per heartbeat between the first and second half (<5% is good for steady efforts of 45+ min)

  • first vs second half (negative/positive split)

  • best efforts: power over 5 s–60 min, heart rate over 1–60 min, fastest 400 m–marathon (running), 5–90 km (cycling), 100 m–3.8 km (swimming)

  • Edwards TRIMP (zone-weighted minutes) and detected work intervals with their consistency

FTP comes from ftp_w, else from the activity's own record (Garmin cycling FTP). Works for multisport legs too.

Input Schema

NameRequiredDescriptionDefault
ftp_wNoFunctional threshold power in watts, for power zones, IF and TSS
activity_idYesGarmin activity ID from garmin_list_activities
response_formatNo'markdown' for readable text (default), 'json' for complete structured datamarkdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description correctly spends its words elsewhere: it discloses the FTP resolution chain ('ftp_w, else from the activity's own record') and gives interpretive context for the decoupling metric. It stops short of stating failure modes, e.g. what happens when no FIT data exists for the activity.

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 one-line purpose followed by a scannable bullet list of outputs; each bullet names a distinct metric family. The enumeration is long but load-bearing for an agent deciding whether this tool answers its question.

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?

With no output schema, the metric list effectively doubles as a return-value contract, and the FTP dependency and metric interpretation are covered. The missing piece is the data precondition: nothing says the activity's FIT file must first be fetched (e.g. via garmin_download_activity_fit), which an agent needs to know before calling.

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%, so baseline is 3; the description earns an extra point by explaining the ftp_w fallback behavior that the schema field text omits, telling the agent it can pass null/minimal input and still get power metrics when a cycling FTP is recorded.

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 specific verb and resource ('compute training metrics for one activity from its second-by-second FIT data') and then enumerates exactly which derived metrics are produced, which cleanly separates it from raw-data siblings like garmin_get_activity or garmin_get_activity_streams. Scope is further pinned down with 'works for multisport legs too'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Implied usage is clear (compute per-activity training metrics), and conditional prerequisites are noted ('with an FTP, in power zones', 'needs FTP'). But it never states when to prefer this over garmin_training_summary, garmin_compare_activities, or garmin_get_activity_laps, nor what to do if the FIT file isn't downloaded yet.

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