Skip to main content
Glama

Get activity details

get_activity_details
Read-onlyIdempotent

Fetch the recorded time-series for one completed activity: heart rate, pace/speed, cadence, power, elevation, GPS and timestamps, running dynamics and pedal balance when the device recorded them, plus lap splits, time in each training zone (Shape's model, and the device's own zones when it recorded them) and a pool swim's lengths. Use this for questions the summary can't answer — how the effort was paced, where the athlete faded, how hard each interval was. Channels are parallel arrays indexed against time (seconds since the activity start), units names the unit of each, and resolutionSeconds is the spacing between points — raise points (up to 2000) if it's too coarse. laps and zones are computed from the full recording before any reduction, so they stay exact whatever resolution you ask for. Only activities recorded by a connected device have this. When there is none, the 404 carries a reason code (not_completed, manual_entry, source_unsupported, imported_before_streams, no_samples_recorded) and a message written to be relayed to the user as-is — use it rather than guessing why the data is absent. Prefer the laps and zones summaries over reading the raw arrays when they answer the question. When a workout was imported from two connected sources, the richest recording is served and detailFrom names it — so source here may differ from the activity's own source. A strength workout's sets are not here: they are the activity's exercises, on get_activity and list_activities.

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": {
      "id": "<id>"
    },
    "name": "get_activity_details"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
pointsNo
channelsNo
includeLapsNo
includeZonesNo
includeLengthsNo

Output Schema

NameRequiredDescriptionDefault
urlNoA link for the athlete to open, not for you to fetch: this activity's page in Shape, where they see the charts and map themselves, signed in. You already have the data here; add the link after your answer when they'd want to look at it themselves.
dateNo
lapsNo
titleNo
unitsNo
zonesNoTime in zone on Shape's own model: HR zones at 60/70/80/90% of the profile's max HR, or Coggan power zones from FTP on a ride. The same model for every source.
pointsYes
sourceNo
lengthsNoA pool swim's lengths in order: startTime and duration (seconds), strokes, stroke (freestyle, backstroke...), swolf (seconds + strokes). Entries with rest: true are rests at the wall.
channelsYes
sportTypeNo
activityIdYes
detailFromNo
deviceZonesNoThe HR and power zones set on the athlete's watch or head unit, with time in each, as its recording file reported them (Garmin and Wahoo; Apple Watch sends none). These are the zones the athlete configured and sees on their device, so quote these when they ask about their zones; zones above is Shape's model, the one to compare across workouts and sources. origin is "device"; model and thresholdHeartRate say how the device sets them. reference is the device's max HR or FTP when it reported one (Garmin), else the top zone bound (Wahoo), so don't read it as the athlete's max. Garmin's zone 0 ("Below zone 1") is time under the athlete's zone 1, and an "Above" bucket past the top bound can appear.
powerSourceNoWhere the power channel came from, when the recording file says for certain: "stryd" (a Stryd pod, through its Connect IQ data field or paired as the watch's power sensor) or "garmin_running_power" (Garmin's Running Power Connect IQ app). Absent otherwise, a watch's own power or a bike's power meter included. One power reading per workout: this labels it, it is not a second one.
resolutionSecondsNo
recordedSampleCountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare read-only/idempotent/non-destructive, and the description adds substantial context on top: that laps and zones are computed from the full recording before downsampling and stay exact, that data exists only for device-recorded activities, that the 404 carries a machine-readable `reason` enum plus a user-relayable `message`, and that multi-source imports serve the richest recording with `detailFrom` naming it. Error semantics and data-provenance behavior are exactly the kind of thing structured fields cannot convey.

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 returned payload before the usage and edge-case material, and nearly every sentence adds a distinct fact (resolution trade-off, exactness of aggregates, error reasons, provenance, the strength-set exclusion). It is dense — the opening sentence is a long enumeration — but not padded; trimming would lose real information.

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 six-parameter data-retrieval tool with an output schema, the description covers the remaining unknowns an agent needs: how to size the response, that aggregates remain exact under reduction, when data will be missing and how the error should be relayed, and which sibling holds data this tool omits. Nothing material is left to inference.

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 carry the load and mostly does: it explains `channels` as parallel arrays indexed against `time` in seconds, that `units` names each unit, that `resolutionSeconds` is the point spacing, and that `points` can be raised (cap 2000) when too coarse. The `includeLaps`/`includeZones`/`includeLengths` flags are only implicitly covered via the default-on discussion of laps and zones, leaving a modest gap.

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?

Opens with a specific verb and resource — 'Fetch the recorded time-series for one completed activity' — then enumerates exactly what is returned (heart rate, pace, cadence, power, elevation, GPS, running dynamics, laps, zones, swim lengths). It explicitly contrasts with the summary endpoint ('questions the summary can't answer') and with get_activity/list_activities for strength sets, so an agent can distinguish it from siblings without opening a 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?

Gives positive guidance ('use this for questions the summary can't answer — how the effort was paced, where the athlete faded'), a preference rule ('prefer the laps and zones summaries over reading the raw arrays'), and an explicit exclusion ('a strength workout's sets are not here: they are the activity's exercises, on get_activity and list_activities'). Both when-to-use and when-not-to-use are covered with named alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources