Skip to main content
Glama

compare_activity_segments

Read-only

Compare the same climb or route segment across 2-10 Garmin activities without GPS by matching distance and elevation profile, returning per-segment metrics with match confidence.

Instructions

Compare the same climb or stretch of route across 2-10 activities without GPS.

Use only when the user asks to analyse a specific activity in detail (e.g. heart-rate response to climbs, pace or cadence within a session). Do not use for general health, recovery or trend questions.

The segment is found in each activity by distance from the start plus the shape of the smoothed elevation profile (shifted and stretched slightly to absorb GPS distance drift), never by position. Each matched activity gets the same per-segment metrics as get_activity_segments plus a match confidence; activities that cannot be matched (indoor, different route, low confidence, read failure) are listed in unmatched with the reason.

Requires saved local Garmin authentication (garmin-owl-auth). Reads Garmin and may update the local cache; never changes your Garmin account. Garmin failures are not retried automatically.

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_ids": "<activity_ids>"
    },
    "name": "compare_activity_segments"
  }
}

Input Schema

NameRequiredDescriptionDefault
segmentNolargest_climb (default): the reference activity's biggest climb. distance_window: start_distance_m to end_distance_m of the reference activity.largest_climb
min_climb_mNoSmallest elevation change in metres that counts as a climb or descent, 1-200; defaults to 5. Smaller undulations are part of flat segments.
activity_idsYes2-10 unique activity IDs of the same route, e.g. a regular loop.
end_distance_mNodistance_window only: window end, at least 50 m after the start.
start_distance_mNodistance_window only: window start in the reference activity.
reference_activity_idNoWhich of activity_ids defines the segment; defaults to the first.

Output Schema

NameRequiredDescriptionDefault
matchedNo
segmentYeslargest_climb or distance_window.
unmatchedNo
availabilityNo
reference_activity_idYes
reference_end_distance_mNo
reference_start_distance_mNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations: discloses the required saved local Garmin authentication, that the local cache may be updated, that the Garmin account is never modified, that Garmin failures are not retried, and how unmatched activities are surfaced with reasons. It also explains the matching heuristic (shifted/stretched profile to absorb GPS distance drift), which is real behavioral context an agent needs to interpret confidence scores.

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-loads purpose, then usage, then mechanism, then operational constraints — a logical progression with no filler. Slightly dense with parentheses and an example list, but every sentence carries information an agent would otherwise have to guess.

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 6-parameter, auth-gated, open-world tool with an output schema, the description covers the operational prerequisites, the failure behavior, and how partial matches are reported in the result. Return-value structure is left to the output schema, which is appropriate.

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 description coverage is 100%, so the six parameters including the segment enum, window bounds and reference_activity_id default are already documented. The description reinforces the 2-10 activity range and that matching is per-activity, but adds no syntax, units or defaults beyond what the schema provides.

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 ('compare the same climb or stretch of route across 2-10 activities') plus the distinguishing constraint ('without GPS'). The mechanism — matched by distance from start plus smoothed elevation-profile shape rather than position — makes it clearly distinct from single-activity segment tools and from broad activity comparison.

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?

Contains an explicit when-to-use condition ('only when the user asks to analyse a specific activity in detail, e.g. heart-rate response to climbs') and an explicit when-not ('do not use for general health, recovery or trend questions'). Altitude is also bounded (2-10 activities), so the agent knows when to fall back.

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