health_get_exercises
Retrieve tracked exercise sessions by date range or activity type, including duration, calories, heart rate, distance, and optional event details, from cache or live API.
Instructions
Get exercise log entries (individual tracked activities).
Returns exercise sessions from the local cache by default. Use live=True to fetch from the API. Run health_sync first to populate the cache.
Args: start_date: Start date as "YYYY-MM-DD", "YYYY-MM", or "30d". Default: last 30 days. end_date: End date as "YYYY-MM-DD". Default: today. exercise_type: Filter by activity name (case-insensitive substring match), e.g. "cycling", "walk", "run". Default: all types. A value matching no workout name the cache holds is refused, naming those, rather than answered as a period with no workouts. live: If true, re-fetch this window from the API before reading the cache. include_detail: If true, include every exercise event (start, pause, stop), split and split summary. Without it each entry carries only how many there are (detail_counts), null where none is stored: an imported workout, one Google sent none for, one synced before these were fetched, or a stored value that cannot be read.
Returns exercise entries with name, duration, calories, avg heart rate, distance, and source (for a synced workout the recording device's name, and data_source.recordingMethod says whether it was logged by hand; for an imported one whatever the import carried), and for a synced workout also start and end times with their UTC offsets, active_seconds, notes, Google's metrics_summary whole (pace, speed, elevation, heart-rate zone durations, mobility), exercise_metadata (hasGps, pool length) and data_source. Note: HR data from cycling may be unreliable (optical sensor vs handlebar grip).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| live | No | ||
| end_date | No | ||
| start_date | No | ||
| exercise_type | No | ||
| include_detail | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |