Skip to main content
Glama

Compare activities

compare_activities
Read-only

Compare up to 10 Garmin activities side by side across pace, GAP, heart rate, power, efficiency, cadence and training load, or find stored sessions similar to one activity.

Instructions

Sessions side by side: pace, GAP, HR, power (best 5/20 min if curve stored), EF, decoupling, IF, TSS, % Z4-5, cadence and running dynamics, temperature, dew point. ids compares those activities; similar_to adds stored sessions like it (same type, duration and pace/GAP within tolerance; optionally same_route, easy_only), newest first with match. Pass exactly one of ids or similar_to, otherwise it returns an error; the similar_to filters combine. For one activity in depth use get_activity. E.g. today vs usual easy runs, progress on a route: {"similar_to":23011268235,"same_route":true}.

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

Input Schema

NameRequiredDescriptionDefault
idsNo2-10 activity ids to put side by side
fromNosimilar_to: earliest date searched (default: 365 days before it)
limitNosimilar_to: most similar sessions returned
easy_onlyNosimilar_to: only sessions under 5 % in Z4-5
same_routeNosimilar_to: same start, end and distance
similar_toNoActivity id to find stored sessions like
duration_pctNosimilar_to: duration within ± this % of it
pace_s_per_kmNosimilar_to: pace or GAP within ± this many s/km

Output Schema

NameRequiredDescriptionDefault
dataYes
metaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.0
    • addedOutput schema / properties / data / properties / activities / items / properties / avg_pace_100m
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / data / properties / activities / items / properties / vs_reference
      Added value: +{
      +  "additionalProperties": {},
      +  "properties": {
      +    "avg_gap_s_per_km": {
      +      "type": "number"
      +    },
      +    "avg_hr_bpm": {
      +      "type": "number"
      +    },
      +    "avg_pace_s_per_km": {
      +      "type": "number"
      +    },
      +    "avg_power_w": {
      +      "type": "number"
      +    },
      +    "avg_speed_kmh": {
      +      "type": "number"
      +    },
      +    "best_20min_w": {
      +      "type": "number"
      +    },
      +    "best_5min_w": {
      +      "type": "number"
      +    },
      +    "decoupling_pct": {
      +      "type": "number"
      +    },
      +    "distance_km": {
      +      "type": "number"
      +    },
      +    "duration_s": {
      +      "type": "number"
      +    },
      +    "ef": {
      +      "type": "number"
      +    },
      +    "elev_gain_m": {
      +      "type": "number"
      +    },
      +    "tss": {
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed2 schema fields changedv0.7.0
    • addedOutput schema / properties / data / properties / activities / items / properties / best_20min_w
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / data / properties / activities / items / properties / best_5min_w
      Added value: +{
      +  "type": "number"
      +}
  3. Changed7 schema fields changedv0.6.2
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / duration_pct / description
      Added value: +"similar_to: duration within ± this % of it"
    • addedInput schema / properties / easy_only / description
      Added value: +"similar_to: only sessions under 5 % in Z4-5"
    • addedInput schema / properties / ids / description
      Added value: +"2-10 activity ids to put side by side"
    • addedInput schema / properties / pace_s_per_km / description
      Added value: +"similar_to: pace or GAP within ± this many s/km"
    • addedInput schema / properties / same_route / description
      Added value: +"similar_to: same start, end and distance"
    • addedInput schema / properties / similar_to / description
      Added value: +"Activity id to find stored sessions like"
  4. First observedv0.6.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint/openWorldHint, so the description carries the rest and does: it discloses the mutual-exclusion error, the similar_to match tolerance model (same type, duration, pace/GAP within tolerance), default search window (365 days back), and newest-first ordering with a `match` field. That is behavior an agent cannot get from the annotations or schema alone.

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 core comparison, then the mode split, the constraint, and an example — a sensible ordering with no filler. The long metric enumeration is dense but each item tells the agent what comes back, so it earns its space.

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 an 8-parameter, dual-mode tool this covers the failure mode, defaults, filter interaction, and output ordering, while an output schema handles return structure and annotations cover safety. An agent has everything needed to pick the right mode and call it correctly.

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 exceeds it by explaining what `ids` vs `similar_to` actually mean, that similar_to filters are conjunctive, and how same_route/easy_only narrow the match. It stops short of restating per-parameter units (duration_pct, pace_s_per_km), which the schema already handles.

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?

"Sessions side by side" plus an explicit metric inventory (pace, GAP, HR, power, EF, decoupling, IF, TSS, Z4-5, cadence, running dynamics, temp) states a specific verb and resource. It also names the sibling it is not ("For one activity in depth use get_activity"), so an agent can route without opening either schema.

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?

It gives the exclusivity rule ("Pass exactly one of `ids` or `similar_to`, otherwise it returns an error"), states that similar_to filters combine, and routes single-activity depth to get_activity. Two concrete scenarios and a literal example payload ({"similar_to":23011268235,"same_route":true}) remove most inference.

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