Skip to main content
Glama

get_activity_intervals

Extract the work reps of an interval session from a Garmin activity, excluding warm-up and cool-down, to see how fast the intervals were actually run.

Instructions

Get the work reps of an interval session, with warm-up and cool-down excluded.

activity_id is the numeric id from list_recent_activities. Use this instead of get_activity_laps when you need what the reps were actually run at: it answers "how fast were the intervals", not "how fast was the run".

Returns a JSON object with "classified_by" — typed_splits (Garmin's recorded workout structure, preferred) or garmin_intensity (the lap intensity field, used only when an activity has no typed structure) — so the caller can see how certain the classification is. "reps" holds one entry per work rep and per rest between them — read is_work_rep rather than assuming every entry is a rep — each with distance_m, duration_s, pace_per_km, avg/max HR. "work_summary" aggregates the work reps only (count, total distance, average/fastest/slowest pace, pace spread, HR). "excluded" lists what was dropped and why.

An unstructured run returns zero work reps rather than one rep covering the whole activity: the activity's own average pace is never a rep pace.

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_intervals"
  }
}

Input Schema

NameRequiredDescriptionDefault
activity_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the classification fallback chain (typed_splits preferred, garmin_intensity only when no typed structure exists), how confidence is surfaced via classified_by, that "excluded" reports dropped items, and the non-obvious edge case that an unstructured run returns zero reps rather than one whole-activity rep.

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 purpose and the sibling distinction, followed by the return-shape caveats. Some of the third paragraph's field enumeration (distance_m, duration_s, pace_per_km, avg/max HR) restates what the output schema already declares, though the adjacent "read is_work_rep rather than assuming" warning does earn its place.

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 single-parameter read tool with an output schema present, this is complete: the agent knows what it returns, how to interpret ambiguous entries, how classification certainty is signaled, and what the empty-result case means. 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.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate; it does by identifying activity_id as the numeric id sourced from list_recent_activities. Minor gap: the schema types it as string while the description calls it numeric, which could cause a formatting question, and no other constraint is given.

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 ("get the work reps of an interval session") with an explicit scope qualifier (warm-up and cool-down excluded). It then distinguishes itself from the nearest sibling with a contrasting question pair: "how fast were the intervals" vs "how fast was the run".

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?

Explicitly names the alternative (get_activity_laps) and the condition that should route the agent there instead: when the question is about the overall run rather than the reps. It also tells the agent where the required id comes from (list_recent_activities).

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