Skip to main content
Glama

Summarize activities

summarize_activities
Read-onlyIdempotent

Aggregate Garmin activities by week, month, weekday, or total to get totals, pace, heart-rate zone time, and training-load trends across a date range.

Instructions

Best tool for activity totals and trends (e.g. 'how far did I run each month', 'has my pace improved'). Fetches every matching activity in the range and returns only aggregates per period and type: count, distance (km and mi), moving time, elevation, longest, average speed and pace (distance-weighted), fastest average pace, average HR, training load, and time in HR zones 1-5 (minutes and %, for zone 2 / 80-20 questions). With group_by 'week' or 'month' it also returns load_trend: load per period, % change vs the previous period, and the acute:chronic ratio at the end of each, with flags for a ratio above 1.3 or a rise over 30%. Use group_by='week' for 'am I building too fast / ramping up too quickly', and for 'compare this block with my last one' (e.g. last_90_days by week, or two ranges). Range up to 366 days.

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

Input Schema

NameRequiredDescriptionDefault
areaNoOnly activities that started inside this latitude/longitude box (decimal degrees).
periodNoNamed period resolved in the user's time zone (weeks start Monday). Use instead of start_date/end_date.
end_dateNoLast day, YYYY-MM-DD, inclusive. Defaults to today.
group_byNomonth
event_typeNoOnly activities tagged with this event type, e.g. race.
start_dateNoFirst day, YYYY-MM-DD, inclusive. Required unless period is given.
activity_typeNoParent type key, e.g. running, cycling, swimming, walking, hiking, fitness_equipment. For anything narrower use activity_subtype.
name_containsNoText the activity name contains (case-insensitive), e.g. 'parkrun' or 'tempo'.
max_distance_mNoMaximum distance in metres.
min_distance_mNoMinimum distance in metres.
activity_subtypeNoSubtype key, e.g. trail_running, treadmill_running, road_biking, strength_training. Works without activity_type.
exclude_childrenNoHide the legs of multisport activities (e.g. a triathlon's swim/bike/run), keeping the parent.
max_duration_minNoMaximum duration in minutes.
min_duration_minNoMinimum duration in minutes.
max_elevation_gain_mNoMaximum elevation gain in metres.
min_elevation_gain_mNoMinimum elevation gain in metres.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.5.0
    • changedInput schema / properties / activity_subtype / description
      Previous value: -"Subtype key within activity_type, e.g. trail_running, treadmill_running, road_cycling."New value: +"Subtype key, e.g. trail_running, treadmill_running, road_biking, strength_training. Works without activity_type."
    • changedInput schema / properties / activity_type / description
      Previous value: -"Parent type key, e.g. running, cycling, swimming, strength_training, walking, hiking."New value: +"Parent type key, e.g. running, cycling, swimming, walking, hiking, fitness_equipment. For anything narrower use activity_subtype."
  2. Changed1 schema field changedv1.4.1
    • changedInput schema / properties / period / enum
      Previous value: -[
      -  "today",
      -  "yesterday",
      -  "last_7_days",
      -  "last_28_days",
      -  "last_30_days",
      -  "last_90_days",
      -  "last_365_days",
      -  "this_week",
      -  "last_week",
      -  "this_month",
      -  "last_month",
      -  "this_year",
      -  "last_year"
      -]New value: +[
      +  "today",
      +  "yesterday",
      +  "last_7_days",
      +  "last_28_days",
      +  "last_30_days",
      +  "last_90_days",
      +  "last_180_days",
      +  "last_365_days",
      +  "this_week",
      +  "last_week",
      +  "this_month",
      +  "last_month",
      +  "this_year",
      +  "last_year"
      +]
  3. Changed7 schema fields changed
    • addedInput schema / properties / area
      Added value: +{
      +  "description": "Only activities that started inside this latitude/longitude box (decimal degrees).",
      +  "properties": {
      +    "east": {
      +      "maximum": 180,
      +      "minimum": -180,
      +      "type": "number"
      +    },
      +    "north": {
      +      "maximum": 90,
      +      "minimum": -90,
      +      "type": "number"
      +    },
      +    "south": {
      +      "maximum": 90,
      +      "minimum": -90,
      +      "type": "number"
      +    },
      +    "west": {
      +      "maximum": 180,
      +      "minimum": -180,
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "north",
      +    "south",
      +    "west",
      +    "east"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / exclude_children
      Added value: +{
      +  "description": "Hide the legs of multisport activities (e.g. a triathlon's swim/bike/run), keeping the parent.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / max_duration_min
      Added value: +{
      +  "description": "Maximum duration in minutes.",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / max_elevation_gain_m
      Added value: +{
      +  "description": "Maximum elevation gain in metres.",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / min_duration_min
      Added value: +{
      +  "description": "Minimum duration in minutes.",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / min_elevation_gain_m
      Added value: +{
      +  "description": "Minimum elevation gain in metres.",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / name_contains
      Added value: +{
      +  "description": "Text the activity name contains (case-insensitive), e.g. 'parkrun' or 'tempo'.",
      +  "maxLength": 100,
      +  "minLength": 1,
      +  "type": "string"
      +}
  4. First observedv1.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), and the description adds real behavioural detail beyond them: it fetches every matching activity but returns only aggregates (relevant for cost/response shape), enumerates the returned metrics, and explains load_trend contents and its 1.3 ratio / 30% rise flags. Procedural caveats such as non-pagination and behaviour on empty result sets are not stated, keeping it below a 5.

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?

The text is front-loaded with purpose and decision triggers before the metric enumeration, and the parenthetical examples do real work. The single dense paragraph bundles several ideas, so a couple of sentences run long, but nothing is redundant.

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?

For a 16-parameter tool with no output schema, the description compensates well by enumerating the returned aggregate fields and trend flags, and by naming the range limit. Remaining gaps are minor: it does not state what happens with no matching activities or whether there is a cap on activities fetched.

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 94%, so the schema already documents inputs, yet the description still adds meaning: it explains what group_by='week' vs 'month' actually produces (load_trend, period-over-period change, acute:chronic ratio), notes distance-weighted pace, and states the 366-day range limit that is absent from the schema. With 16 parameters, the filtering options are only lightly touched in the description, which relies on the schema for the rest.

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?

The description opens with a specific verb and resource ("Best tool for activity totals and trends") and immediately anchors it with concrete question examples ("how far did I run each month", "has my pace improved"). Because it returns only aggregates per period and type, it is clearly distinguishable from per-activity siblings like get_activity or search_activities.

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?

It gives explicit when-to-use triggers, including the specific case for group_by='week' ("am I building too fast / ramping up too quickly") and block comparisons against a previous range, plus the 366-day range cap. It stops short of naming sibling tools to avoid (e.g. compare_activities for two-activity comparison), so the routing guidance is clear but not exhaustive.

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