Workouts
apple_health_workoutsRetrieve Apple Health workout session data for a specific date to analyze fitness activities and performance metrics from local iCloud storage.
Instructions
Get workout sessions for a date
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": "apple_health_workouts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | YYYY-MM-DD, defaults to today |
Implementation Reference
- src/mcp.ts:248-256 (handler)Registration and handler implementation for the apple_health_workouts tool.
server.registerTool("apple_health_workouts", { title: "Workouts", description: "Get workout sessions for a date", inputSchema: z.object({ date: optDate }), }, async ({ date }) => { const d = date ?? today(); const workouts = parseWorkouts(d); return text({ date: d, count: workouts.length, workouts }); });