Skip To Main Content
All modules

Fitness

Fields marked * are required. Updates keep every field they are not given. An AI app can ask vritto_describe for the same details, filtered to what its connection may use.

WorkoutworkoutHealth, off until allowed

One workout, cardio or strength. The same operations reach sleep sessions (type 'sleep'), body measurements (type 'measurement'), water (type 'hydration'), a meal's calorie and macro totals (type 'nutrition') and a day's manual activity totals (type 'activity'); the read also returns the dashboard, trends, insights, journal-tag correlations and a yearly recap.

fitness_findFindthrough vritto_find

Read Fitness: no filter gives the dashboard (current state, newest records); type with from/to lists one kind of record in a period; view 'trends' (metric, period, date for a past week, month or year), 'insights', 'recap' (year) or 'correlations'. ALWAYS pass from/to when the question concerns a period.

Note: No filter returns the dashboard (newest records only); type with from/to lists one kind of record in a period; view 'trends', 'insights', 'correlations' or 'recap' reads those summaries.

FieldTypeDescription
viewone of dashboard, trends, insights, correlations, recap'dashboard' (default); 'trends' a year of daily series, or with metric one period; 'insights' today's readiness, prescription, intensity minutes and training load; 'correlations' 90 days of journal-tag correlations; 'recap' a year in review.
typeone of workout, sleep, measurement, hydration, nutrition, activityList this kind of record instead of the dashboard: 'workout', 'sleep', 'measurement', 'hydration', 'nutrition' or 'activity' (daily totals).
idstringReturn just this record (with type), every field.
fromstringRecords on or after this date. ALWAYS pass from/to when the question concerns a period.
tostringRecords on or before this date.
querystringText to match: an activity type or title, a meal's name, a measurement kind.
limitintegerRows to return, default 50.
detailone of summary, full'summary' (default) compact rows; 'full' every field incl. sets, stages and notes.
metricone of steps, sleepTrends: steps or sleep for one period instead of the year of daily series. Sleep values are minutes asleep.
periodone of week, month, yearTrends: calendar period containing date (weeks start Monday). Week and month return daily values, year returns monthly daily averages.
datestringTrends: any local date YYYY-MM-DD inside the period; defaults to today.
yearintegerRecap: calendar year; defaults to the current year.
Example input
{}
fitness_addCreate or Updatethrough vritto_create or vritto_update

Log what the user describes: a workout ('I ran 5k in 28 minutes this morning'; startedAt plus durationSec or endedAt; strength sets with warm-ups marked), sleep or a body measurement in record; water (volumeMl), a meal's totals or a day's activity totals as top-level fields. PRs are detected automatically. Activity totals REPLACE the day's manual entry.

Note: A workout, sleep session or measurement goes in record; water, a meal and a day's activity totals are top-level fields with their type. SI units: kg for weight and lean mass, cm for lengths, percent for body fat. Activity totals replace the day's manual entry.

FieldTypeDescription
typeone of workout, sleep, measurement, hydration, nutrition, activity'workout' (default), 'sleep' (a night or nap), 'measurement' (weight, body fat, a body measurement), 'hydration' (water), 'nutrition' (a meal's totals) or 'activity' (a day's manual totals).
recordobjectA workout, sleep session or body measurement.
record.idstringLeave out when adding; to correct an entry use fitness_change.
record.startedAtstringISO date-time a workout started, or bed time for sleep. Required for both.
record.endedAtstringISO date-time a workout ended (alternative to durationSec), or wake time for sleep (required).
record.timeZoneIdstringIANA time zone of the workout or night, e.g. 'America/New_York'.
record.notesstring
record.activityTypestringWorkout: unified activity type, e.g. running, walking, cycling, strength_training, hiit, yoga, swimming_pool. Unknown values fall back to 'other'.
record.titlestring
record.durationSecintegerWorkout duration in seconds. Required unless endedAt is provided.
record.distanceMnumber
record.activeEnergyKcalnumber
record.avgHrnumberAverage heart rate, bpm.
record.maxHrnumberMax heart rate, bpm.
record.elevationGainMnumberElevation gain in meters.
record.effortRpenumberPerceived effort 1-10; 7+ counts as vigorous.
record.feelsintegerHow the workout felt, 1 (awful) to 5 (great).
record.routineIdstringID of the routine this workout followed, from the dashboard's routines: never invented.
record.exerciseslist of objectWorkout: strength exercises with sets; omit for cardio.
record.isNapboolean
record.qualityRatingintegerSleep quality, 0 to 5.
record.interruptionsintegerNumber of times the user woke during the night.
record.stageslist of objectSleep-stage spans, if the user reports them. Usually omit for manual logs.
record.typeone of weight, body_fat, lean_mass, height, neck, shoulders, chest, waist, hips, biceps_left, biceps_right, forearm_left, forearm_right, thigh_left, thigh_right, calf_left, calf_rightMeasurement kind. Required for a measurement.
record.valuenumberMeasurement value in SI units: kg for weight/lean_mass, cm for lengths, percent for body_fat.
record.measuredAtstringISO date-time of a measurement; defaults to now.
volumeMlnumberWater: volume in ml, e.g. 500.
namestringMeal: what was eaten, e.g. 'Chicken burrito'.
mealTypeone of breakfast, lunch, dinner, snack, unknownMeal: defaults to 'unknown'.
kcalnumberMeal: calories.
proteinGnumberMeal: protein in grams.
carbsGnumberMeal: carbohydrates in grams.
fatGnumberMeal: fat in grams.
loggedAtstringWater or meal: ISO date-time it was drunk or eaten; defaults to now. Use for backfills like 'this morning'.
datestringActivity: the day, defaults to today.
stepsinteger
exerciseMinutesnumber
activeEnergyKcalnumber
distanceMnumber
floorsnumberFloors/flights climbed.
mindfulMinutesnumber
timeZoneIdstringIANA time zone the day belongs to, e.g. 'America/New_York'.
Example input
{
  "type": "workout",
  "record": {
    "activityType": "running",
    "title": "Morning 5K",
    "startedAt": "2026-09-26T07:05:00-05:00",
    "durationSec": 1680,
    "distanceM": 5000
  }
}
fitness_changeUpdatethrough vritto_update

Correct one logged workout, sleep session or measurement by type and record.id; only the fields you send change (exercises and stages replace whole when sent). For a day's activity totals send type 'activity' with date and the new values. Water and meal logs can't be edited. Resolve the id with fitness_find first.

Note: Only sent fields change; exercises and stages replace whole when sent. Water and meal logs can't be edited.

FieldTypeDescription
typeone of workout, sleep, measurement, hydration, nutrition, activity'workout' (default), 'sleep' (a night or nap), 'measurement' (weight, body fat, a body measurement), 'hydration' (water), 'nutrition' (a meal's totals) or 'activity' (a day's manual totals).
recordobjectThe record's id plus the fields to change.
record.idstringLeave out when adding; to correct an entry use fitness_change.
record.startedAtstringISO date-time a workout started, or bed time for sleep. Required for both.
record.endedAtstringISO date-time a workout ended (alternative to durationSec), or wake time for sleep (required).
record.timeZoneIdstringIANA time zone of the workout or night, e.g. 'America/New_York'.
record.notesstring
record.activityTypestringWorkout: unified activity type, e.g. running, walking, cycling, strength_training, hiit, yoga, swimming_pool. Unknown values fall back to 'other'.
record.titlestring
record.durationSecintegerWorkout duration in seconds. Required unless endedAt is provided.
record.distanceMnumber
record.activeEnergyKcalnumber
record.avgHrnumberAverage heart rate, bpm.
record.maxHrnumberMax heart rate, bpm.
record.elevationGainMnumberElevation gain in meters.
record.effortRpenumberPerceived effort 1-10; 7+ counts as vigorous.
record.feelsintegerHow the workout felt, 1 (awful) to 5 (great).
record.routineIdstringID of the routine this workout followed, from the dashboard's routines: never invented.
record.exerciseslist of objectWorkout: strength exercises with sets; omit for cardio.
record.isNapboolean
record.qualityRatingintegerSleep quality, 0 to 5.
record.interruptionsintegerNumber of times the user woke during the night.
record.stageslist of objectSleep-stage spans, if the user reports them. Usually omit for manual logs.
record.typeone of weight, body_fat, lean_mass, height, neck, shoulders, chest, waist, hips, biceps_left, biceps_right, forearm_left, forearm_right, thigh_left, thigh_right, calf_left, calf_rightMeasurement kind. Required for a measurement.
record.valuenumberMeasurement value in SI units: kg for weight/lean_mass, cm for lengths, percent for body_fat.
record.measuredAtstringISO date-time of a measurement; defaults to now.
datestringActivity: the day, defaults to today.
stepsinteger
exerciseMinutesnumber
activeEnergyKcalnumber
distanceMnumber
floorsnumberFloors/flights climbed.
mindfulMinutesnumber
timeZoneIdstringIANA time zone the day belongs to, e.g. 'America/New_York'.
Example input
{
  "type": "workout",
  "record": {
    "id": "workout_abc",
    "durationSec": 3000
  }
}
fitness_removeDeletethrough vritto_delete

Remove one manual entry: a workout (and the PRs it set), sleep session, measurement, water or meal log, by type and id. Only for explicit removals; a synced record is removed in Apple Health or Health Connect. Resolve the id with fitness_find first.

Note: Manual entries only; a record synced from Apple Health or Health Connect is removed there.

FieldTypeDescription
typeone of workout, sleep, measurement, hydration, nutrition, activity'workout' (default), 'sleep' (a night or nap), 'measurement' (weight, body fat, a body measurement), 'hydration' (water), 'nutrition' (a meal's totals) or 'activity' (a day's manual totals).
id*stringRecord ID from a prior fitness_find result, never invented.