get_workout
Retrieve complete workout summary including laps, heart rate zones, training effect, and sport-specific metrics. Use after listing workouts to get full details.
Instructions
Returns the full summary for one workout: all fields Suunto exposes including laps, HR zones, training-effect score, and sport-specific metrics (pace zones for running, power for cycling, etc.). Throws SuuntoNotFoundError if the workoutKey does not exist. Use list_workouts to discover valid workoutKey values. For second-by-second time-series (HR, pace, GPS) use get_workout_samples instead. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workoutKey | Yes | Opaque server-assigned string returned by list_workouts. Not guessable or constructable — always discover via list_workouts first. Passing an invalid key throws SuuntoNotFoundError. |
Implementation Reference
- src/index.ts:82-97 (registration)Tool registration: defines the 'get_workout' tool with name, description, and inputSchema (requiring workoutKey string).
{ name: "get_workout", description: "Returns the full summary for one workout: all fields Suunto exposes including laps, HR zones, training-effect score, and sport-specific metrics (pace zones for running, power for cycling, etc.). Throws SuuntoNotFoundError if the workoutKey does not exist. Use list_workouts to discover valid workoutKey values. For second-by-second time-series (HR, pace, GPS) use get_workout_samples instead. Read-only.", inputSchema: { type: "object", properties: { workoutKey: { type: "string", minLength: 1, description: "Opaque server-assigned string returned by list_workouts. Not guessable or constructable — always discover via list_workouts first. Passing an invalid key throws SuuntoNotFoundError.", }, }, required: ["workoutKey"], }, }, - src/index.ts:86-96 (schema)Input schema for get_workout: requires 'workoutKey' (string, minLength 1).
inputSchema: { type: "object", properties: { workoutKey: { type: "string", minLength: 1, description: "Opaque server-assigned string returned by list_workouts. Not guessable or constructable — always discover via list_workouts first. Passing an invalid key throws SuuntoNotFoundError.", }, }, required: ["workoutKey"], }, - src/index.ts:325-328 (handler)Handler for get_workout: calls suunto.getWorkout(a.workoutKey) and returns JSON result.
case "get_workout": { const data = await suunto.getWorkout(a.workoutKey); return text(JSON.stringify(data)); } - src/api.ts:114-116 (helper)API helper method getWorkout: calls Suunto API endpoint /v2/workout/{workoutKey} and returns parsed JSON.
getWorkout(workoutKey: string) { return this.json<any>(`/v2/workout/${encodeURIComponent(workoutKey)}`); } - src/cli.ts:73-77 (registration)CLI handler for 'get-workout' command (dash variant), calls suunto.getWorkout(key).
case "get-workout": { const key = rest[0] ?? die("Usage: get-workout <workoutKey>"); out(await suunto.getWorkout(key)); break; }