Skip to main content
Glama
Loopback Training Server

Loopback Training Server

get_workout_activities

Retrieve a workout's interval and segment breakdown—warmup, work, rest, and cooldown steps—with distance, duration, heart rate, and timing.

Instructions

Get the interval/segment breakdown of a workout (warmup, work, rest periods).

This extracts the 'activities' array from a workout, which describes the structured program that was followed — one entry per step the watch ran (warmup, work, rest, cooldown), each with distance, duration, heart rate, and timing.

Args: workout_id: UUID of the workout.

Returns: List of activity segment objects, each with: activityType, startDate, endDate, duration, totalDistance, totalEnergyBurned, averageHeartRate, and metadata — metadata.WOIntervalStepKeyPath encodes the position in the composed structure as "block.iteration.step" (e.g. "1.2.0" = 2nd block, 3rd iteration, 1st step; map it to the queue item's blocks to know whether a segment was work or recovery), with WOIntervalStepSuccessful/HKElevationAscended alongside. Returns an empty list if the workout has no structured 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": {
      "workout_id": "<workout_id>"
    },
    "name": "get_workout_activities"
  }
}

Input Schema

NameRequiredDescriptionDefault
workout_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.36

TDQS

A3.9/5.0
Behavior4/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 well: it discloses that the tool extracts a specific nested array, that the result may be an empty list when no structured activities exist, and how metadata.WOIntervalStepKeyPath encodes position. It omits auth requirements or any pagination/size limits, which is the main remaining gap.

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 in the first line, then progressively deeper detail on structure and return shape. The metadata paragraph is dense but each sentence carries real decoding information; only minor trimming would be possible.

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?

There is no output schema, so the description must explain return values and it does so thoroughly — listing the segment fields and explaining the interval key-path encoding with a worked example. For a read-only single-parameter tool, an agent has everything needed to call it and interpret the result.

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 0%, so the description must compensate for the single parameter, and it does by stating 'workout_id: UUID of the workout', which adds the expected identifier format that the bare string schema does not convey. With only one required parameter there is little else to disambiguate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 interval/segment breakdown of a workout') and immediately narrows scope to the structured 'activities' array of warmup/work/rest/cooldown steps. That implicitly separates it from siblings like get_workout_splits or get_workout_heartrate, though it never names them explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the content description — an agent can infer this is the tool for per-step program structure rather than aggregate splits. However, there is no explicit when-to-use vs when-not-to-use guidance and no named alternatives, so the agent must reason from the data shape alone.

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