get_scheduled_workout_by_id
Retrieve a scheduled workout's details from a training plan using its unique ID.
Instructions
Get a specific scheduled workout by ID from a training plan
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workoutId | Yes | The scheduled workout ID |
Implementation Reference
- src/client/garmin.client.ts:552-554 (handler)Client handler method that makes the HTTP request to the scheduled workout endpoint using the workout ID
async getScheduledWorkout(workoutId: string): Promise<unknown> { return this.request(`${SCHEDULED_WORKOUT_ENDPOINT}/${workoutId}`); } - src/tools/training.tools.ts:47-59 (registration)Registration of the 'get_scheduled_workout_by_id' tool with the MCP server
server.registerTool( 'get_scheduled_workout_by_id', { description: 'Get a specific scheduled workout by ID from a training plan', inputSchema: getScheduledWorkoutSchema.shape, }, async ({ workoutId }) => { const data = await client.getScheduledWorkout(workoutId); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; }, ); - src/dtos/performance.dto.ts:74-76 (schema)Zod input schema for get_scheduled_workout_by_id, validating the required 'workoutId' string
export const getScheduledWorkoutSchema = z.object({ workoutId: z.string().describe('The scheduled workout ID'), }); - Endpoint constant for the scheduled workout API path
export const SCHEDULED_WORKOUT_ENDPOINT = '/workout-service/schedule';