Skip to main content
Glama

Activity analysis (splits, laps, best efforts, power)

get_activity_analysis
Read-onlyIdempotent

Analyze one recorded Garmin activity from its FIT file to get per-km/mile splits, watch laps, best efforts, HR-zone time, first-vs-second-half drift, and power metrics.

Instructions

Per-km or per-mile splits, the watch's laps / workout reps, best efforts, time in HR zones and first-vs-second-half drift and power for ONE recorded activity, computed from Garmin's original FIT file. Use for 'my km splits', 'did I negative split', 'fastest 5 km', 'how long in zone 2', 'did my HR drift', 'my 20 min power', 'what was my NP'. splits: one row per km/mile (time, pace or speed, HR, cadence, power, elevation), timer time so pauses don't count, final partial split labelled. laps: the watch's own laps with intensity (warmup/active/cooldown/rest) and trigger (manual, distance, ...). best_efforts: fastest continuous 1 km, 1 mile, 5 km, 10 km, half and marathon the activity is long enough for, with where each started. hr_zones: time in each HR zone, as the watch recorded it (matches Garmin Connect and summarize_activities). drift: first vs second half pace or speed, HR and aerobic decoupling. power: average, normalized (NP), best 5 s to 60 min, and for rides IF and TSS when ftp_watts is given. Get the ID from search_activities. Manual entries and GPX/TCX imports return a short 'unavailable' note.

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": {
      "activity_id": "<activity_id>"
    },
    "name": "get_activity_analysis"
  }
}

Input Schema

NameRequiredDescriptionDefault
unitNoSplit length and pace unit. Defaults to the user's Garmin unit setting.
includeNoSections to return. Drop ones the question doesn't need for a shorter answer.
ftp_wattsNoThe user's cycling FTP, for IF and TSS. Only if they've given it; Garmin's API doesn't have it.
activity_idYesGarmin activity ID, from search_activities.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.5.0
    • addedInput schema / properties / ftp_watts
      Added value: +{
      +  "description": "The user's cycling FTP, for IF and TSS. Only if they've given it; Garmin's API doesn't have it.",
      +  "maximum": 700,
      +  "minimum": 30,
      +  "type": "integer"
      +}
    • changedInput schema / properties / include / default
      Previous value: -[
      -  "splits",
      -  "laps",
      -  "best_efforts",
      -  "hr_zones",
      -  "drift"
      -]New value: +[
      +  "splits",
      +  "laps",
      +  "best_efforts",
      +  "hr_zones",
      +  "drift",
      +  "power"
      +]
    • changedInput schema / properties / include / items / enum
      Previous value: -[
      -  "splits",
      -  "laps",
      -  "best_efforts",
      -  "hr_zones",
      -  "drift"
      -]New value: +[
      +  "splits",
      +  "laps",
      +  "best_efforts",
      +  "hr_zones",
      +  "drift",
      +  "power"
      +]
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (read-only, idempotent, non-destructive), and the description adds substantial context on top: data provenance (computed from Garmin's original FIT file), timing semantics (timer time so pauses don't count), labelling of the final partial split, the fact that HR zones match Garmin Connect, and the explicit unavailability case for manual/GPX/TCX activities.

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 with the scope statement and 'Use for' triggers before the section reference, so an agent can decide quickly. It is dense and runs long as a single block, but nearly every clause carries operational detail; only the repeated per-section phrasing could be trimmed.

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?

With no output schema, the description carries the burden of describing return values, and it does so for every section including the columns of a split row. The complexity of a six-section analytics tool is fully matched by the explanation, including the degraded-response case.

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 the baseline is 3; the description earns an extra point by expanding each 'include' section enumerator into a definition (e.g. best_efforts = fastest continuous 1 km/1 mile/5 km/10 km/half/marathon the activity is long enough for, with start locations), which the enum list alone does not convey. It also ties ftp_watts to its effect (IF and TSS for rides) rather than restating 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?

Names a precise resource (splits, laps, best efforts, HR zones, drift, power for ONE recorded activity) and explicitly constrains scope to a single activity, distinguishing it from summarize_activities and compare_activities. The parenthetical title and the section-by-section enumeration make the tool's output unmistakable.

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?

Provides concrete user-question triggers ('my km splits', 'did I negative split', 'my 20 min power') plus a prerequisite, 'Get the ID from search_activities', which routes the agent to the right upstream tool. It also flags the exclude-case (manual entries and GPX/TCX imports return 'unavailable'), but never names which sibling to use instead when the user wants whole-activity totals or cross-activity comparison.

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