get_workouts
Retrieve workout details for a specific time period from Fulcra Context MCP. Input start and end timestamps with time zones; results are translated to the user's local time zone.
Instructions
Get details about the workouts that the user has done during a period of time. Result timestamps will include time zones. Always translate timestamps to the user's local time zone when this is known.
Args: start_time: The starting time of the period. Must include tz (ISO8601). end_time: the ending time of the period. Must include tz (ISO8601).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_time | Yes | ||
| start_time | Yes |
Implementation Reference
- fulcra_mcp/main.py:300-313 (handler)The handler function for the 'get_workouts' tool, registered via @mcp.tool() decorator. It fetches workouts from FulcraAPI.apple_workouts between start_time and end_time, formats as JSON string.@mcp.tool() async def get_workouts(start_time: datetime, end_time: datetime) -> str: """Get details about the workouts that the user has done during a period of time. Result timestamps will include time zones. Always translate timestamps to the user's local time zone when this is known. Args: start_time: The starting time of the period. Must include tz (ISO8601). end_time: the ending time of the period. Must include tz (ISO8601). """ fulcra = get_fulcra_object() workouts = fulcra.apple_workouts(start_time, end_time) return f"Workouts during {start_time} and {end_time}: " + json.dumps(workouts)