connacto
Back to Workout Tracking

Workout Tracking tools

Every tool in this module, with its full description, parameters, and return value. All of them require the module to be active first. See the Workout Tracking overview for how to turn it on.

CRUD

Core tools

Create, read, update, and delete entries. Every module has exactly these four.

workout_tracking_log_set

Log one or more sets for an exercise in the user's active Workout Tracking module. Finds or creates the workout session for the given date (defaults to today) and finds or creates the exercise within it, then appends set(s). IMPORTANT: when sets share identical reps/weight/RPE, pass sets: N once (e.g. '3 sets of 8 reps at 185 lbs' -> sets: 3, reps: 8, weight_lbs: 185) instead of calling this tool three times. Only call this tool once per set when reps/weight/RPE actually vary set-to-set (e.g. a descending set of sit-ups: 13, 15, 20 reps -> call three times, once per set, passing the first call's returned exercise.id as workout_exercise_id on the 2nd and 3rd calls so they land under the same exercise instead of creating duplicates). Requires the module to be active — see create_database. Resolves the exercise against the exercise catalog automatically when the name is a confident match.

Parameters

NameTypeRequiredNotes
exercisestringNoName of the exercise, e.g. 'Bench Press' or 'Squat'. Required unless workout_exercise_id is given.
exercise_idstringNoExact exercises.id from workout_tracking_search_exercises, if already known. Skips automatic matching.
workout_exercise_idstringNoExact workout_exercises.id (from a prior call's response) to append this set to an exercise already logged, instead of resolving by name.
workout_idstringNoExact workouts.id to log against a specific existing session, instead of resolving by date.
datestringNoCalendar date of the workout session (defaults to today). Finds or creates that day's workout.
setsnumberNoNumber of identical set rows to insert in this call (default 1). Use for uniform sets.
repsnumberNoNumber of reps performed per set.
weight_lbsnumberNoWeight lifted, in pounds.
rpenumberNoRate of perceived exertion, 1-10 scale.
is_prbooleanNoTrue if this set was a personal record.
duration_minutesnumberNoDuration of a cardio effort, in minutes.
distance_milesnumberNoDistance covered during a cardio effort, in miles.
plan_exercise_idstringNoExact workout_plan_exercises.id (from workout_tracking_get_scheduled_workout or workout_tracking_get_plan) this exercise fulfills, if logging against a plan.

Returns

The workout, the exercise, and the created set(s) as JSON, plus today's scheduled plan exercises if an active plan has any.

workout_tracking_update_set

Update fields on a single logged set.

Parameters

NameTypeRequiredNotes
set_idstringYesID of the workout_sets row to update.
repsnumberNoNumber of reps performed.
weight_lbsnumberNoWeight lifted, in pounds.
rpenumberNoRate of perceived exertion, 1-10 scale.
is_prbooleanNoTrue if this set was a personal record.
duration_minutesnumberNoDuration of a cardio effort, in minutes.
distance_milesnumberNoDistance covered during a cardio effort, in miles.

Returns

The updated or deleted entry as JSON. Returns an error if entryId does not belong to an entry in the active database.

workout_tracking_delete_set

Delete a single logged set from an exercise.

Parameters

NameTypeRequiredNotes
set_idstringYesID of the workout_sets row to delete.

Returns

The updated or deleted entry as JSON. Returns an error if entryId does not belong to an entry in the active database.

workout_tracking_delete_exercise

Delete an exercise logged within a workout, along with all of its sets.

Parameters

NameTypeRequiredNotes
workout_exercise_idstringYesID of the workout_exercises row to delete.

Returns

The updated or deleted entry as JSON. Returns an error if entryId does not belong to an entry in the active database.

workout_tracking_list_workouts

List logged workout sessions in the user's active Workout Tracking module, most recent date first.

Parameters

NameTypeRequiredNotes
limitnumberNoMax entries to return (default 100, max 500).

Returns

Every workout session in the active database, as a JSON array.

workout_tracking_get_workout

Get a logged workout session along with every exercise logged in it and each exercise's sets.

Parameters

NameTypeRequiredNotes
workout_idstringYesID of the workouts row to fetch.

Returns

The workout nested with its exercises and each exercise's sets, as JSON.

Specialized

Purpose-built tools

Shortcuts and queries shaped around how Workout Tracking is actually used, so your agent doesn't have to fetch every entry and filter them itself.

workout_tracking_attach_photo

Attach a photo to an existing Workout Tracking entry (replacing any photo already on it). If you have the image's raw bytes, pass photo_base64. If the user attached the image in a chat client (e.g. claude.ai), you cannot read its bytes: call this WITHOUT photo_base64 to get a one-time upload link, and give that link to the user so they can upload the photo themselves. The link expires in 30 minutes. Photos are stored privately; the returned viewPath is only viewable signed into the connacto web app as this user.

Parameters

NameTypeRequiredNotes
entryIdstringYesID of the Workout Tracking entry to attach the photo to.
photo_base64stringNoThe photo, base64-encoded (no data: URI prefix). Omit when you cannot read the image bytes — the tool then returns an upload link for the user instead.
photo_content_typeimage/jpeg | image/png | image/webp | image/heicNoMIME type of the photo, if photo_base64 is set. Defaults to image/jpeg.

Returns

JSON with a private viewPath when photo_base64 was given, or an uploadUrl to hand the user when it was not.

workout_tracking_update_exercise

Update fields on an exercise logged within a workout. Its sets are managed separately via workout_tracking_update_set/delete_set.

Parameters

NameTypeRequiredNotes
workout_exercise_idstringYesID of the workout_exercises row to update.
exercisestringNoName of the exercise, e.g. 'Bench Press' or 'Squat'.
exercise_idstringNoExact exercises.id from workout_tracking_search_exercises. Skips automatic matching.
order_indexnumberNoSort order within the workout, lower first.
plan_exercise_idstringNoExact workout_plan_exercises.id this exercise fulfills, if logging against a plan.
notesstringNo

Returns

Returns the result of this tool call as JSON.

workout_tracking_update_workout

Update fields on a logged workout session: its date, label, notes, or which plan day it fulfills.

Parameters

NameTypeRequiredNotes
workout_idstringYesID of the workouts row to update.
datestringNo
labelstringNo
notesstringNo
plan_day_idstringNoExact workout_plan_days.id this session fulfills.

Returns

Returns the result of this tool call as JSON.

workout_tracking_delete_workout

Delete a logged workout session, along with every exercise and set it contains.

Parameters

NameTypeRequiredNotes
workout_idstringYesID of the workouts row to delete.

Returns

Returns the result of this tool call as JSON.

workout_tracking_exercise_history

List every logged set for a specific exercise in the user's active Workout Tracking module, ordered oldest to newest, to show progression over time.

Parameters

NameTypeRequiredNotes
exercisestringYesName of the exercise to look up history for, e.g. 'Bench Press'.

Returns

Every logged set for that exercise, oldest first, as a JSON array.

workout_tracking_personal_records

List all sets marked as a personal record (PR) in the user's active Workout Tracking module, newest first.

Parameters

None. Call it with an empty object.

Returns

Every set with is_pr true, newest first, as a JSON array.

workout_tracking_search_exercises

Look up candidate exercises by name or alias when the exact match for an entry is unclear. Use the returned id as exercise_id in workout_tracking_log_set or workout_tracking_update_exercise.

Parameters

NameTypeRequiredNotes
querystringYesFree-text exercise name to search for, e.g. 'bench' or 'goblet squat'.
limitnumberNoMax candidates to return (default 5, max 20).

Returns

Candidate exercises with their muscle group, equipment, and match score, as a JSON array.

workout_tracking_volume_by_muscle_group

Sum training volume (reps times weight, summed across every logged set) in the active Workout Tracking module, grouped by primary muscle, joined against the exercise catalog. Sets whose exercise never resolved to the catalog are excluded and counted separately.

Parameters

NameTypeRequiredNotes
startDatestringNo
endDatestringNo

Returns

Per-muscle-group volume totals plus a count of sets excluded for lacking a resolved exercise, as JSON.

workout_tracking_list_program_templates

List built-in named workout program templates (e.g. Push/Pull/Legs, PHUL, PHAT, Upper/Lower, Full Body) the user can start with workout_tracking_start_program instead of building a plan by hand. Does not require an active database.

Parameters

None. Call it with an empty object.

Returns

Every template's slug, name, description, and days-per-week, as a JSON array.

workout_tracking_get_program_template

Get the full weekly schedule (every day, its label, rest days, and prescribed exercises with target sets/reps) for one built-in program template. Use this to show the user what a template involves before starting it.

Parameters

NameTypeRequiredNotes
template_slugstringYesSlug from workout_tracking_list_program_templates, e.g. 'ppl-6day' or 'phul'.

Returns

The template's full schedule with target sets/reps per exercise, as JSON.

workout_tracking_start_program

Instantiate a built-in program template (see workout_tracking_list_program_templates) into a real workout plan for the user's active Workout Tracking module: creates the plan, every scheduled day, and every prescribed exercise in one call. Once started, workout_tracking_get_scheduled_workout (or the scheduledPlan on workout_tracking_log_set) tells you what's prescribed on any given day.

Parameters

NameTypeRequiredNotes
template_slugstringYesSlug from workout_tracking_list_program_templates, e.g. 'ppl-6day' or 'phul'.
start_datestringYesDate the program's weekly schedule is anchored to. The template's day-of-week labels apply from this date forward.
namestringNoOverride the plan's name. Defaults to the template's name.
deactivate_other_plansbooleanNoMark every other plan in this database inactive when starting this one, so there's a single unambiguous current program (default true). Pass false to run this alongside existing plans.

Returns

The created plan nested with its scheduled days and each day's prescribed exercises, as JSON.

workout_tracking_create_plan

Create a workout program in the user's active Workout Tracking module: a name, a start date anchoring day-of-week resolution, and an optional multi-week cycle length for ramping/periodized programs. Add scheduled days with workout_tracking_add_plan_day once created.

Parameters

NameTypeRequiredNotes
namestringYesName of the plan, e.g. '5/3/1 Ramping Block'.
descriptionstringNoFree-text description of the plan.
start_datestringYesDate the plan's week 1 / day-of-week schedule is anchored to.
num_weeksnumberNoNumber of distinct weeks in one cycle, for ramping/periodized plans. Omit for a single weekly template that repeats indefinitely.
repeat_cyclebooleanNoWhen num_weeks is set, whether the whole block repeats after it ends (default true). false runs the program once.

Returns

Returns the result of this tool call as JSON.

workout_tracking_list_plans

List workout plans in the user's active Workout Tracking module.

Parameters

NameTypeRequiredNotes
limitnumberNoMax entries to return (default 100, max 500).

Returns

Returns the result of this tool call as JSON.

workout_tracking_update_plan

Update fields on an existing workout plan. To end/stop/finish the user's current program, set is_active: false here rather than deleting it. To switch to a different program, use workout_tracking_start_program instead, which deactivates the old one automatically.

Parameters

NameTypeRequiredNotes
planIdstringYesID of the workout_plans row to update.
namestringNo
descriptionstringNo
start_datestringNo
num_weeksnumberNo
repeat_cyclebooleanNo
is_activebooleanNoSet false to end/stop/pause/retire the plan without deleting it or its history. Set true to resume a previously ended plan.

Returns

Returns the result of this tool call as JSON.

workout_tracking_delete_plan

Delete a workout plan and all of its scheduled days and prescribed exercises.

Parameters

NameTypeRequiredNotes
planIdstringYesID of the workout_plans row to delete.

Returns

Returns the result of this tool call as JSON.

workout_tracking_add_plan_day

Add a scheduled day to a workout plan: either a recurring weekday slot (day_of_week) or a one-off override for an exact calendar date (specific_date). Exactly one of the two must be given.

Parameters

NameTypeRequiredNotes
planIdstringYesID of the workout_plans row this day belongs to.
week_numbernumberNo1-based week within the plan's cycle, for ramping plans. Defaults to 1.
day_of_weeknumberNoRecurring weekday slot, 0=Sunday..6=Saturday.
specific_datestringNoOne-off override for an exact calendar date. Takes precedence over day_of_week on that date.
labelstringNoLabel for the day, e.g. 'Push Day' or 'Rest'.
is_rest_daybooleanNo
notesstringNo

Returns

Returns the result of this tool call as JSON.

workout_tracking_update_plan_day

Update fields on an existing scheduled day of a workout plan.

Parameters

NameTypeRequiredNotes
planDayIdstringYesID of the workout_plan_days row to update.
week_numbernumberNo
day_of_weeknumberNo
specific_datestringNo
labelstringNo
is_rest_daybooleanNo
notesstringNo

Returns

Returns the result of this tool call as JSON.

workout_tracking_delete_plan_day

Delete a scheduled day from a workout plan, along with its prescribed exercises.

Parameters

NameTypeRequiredNotes
planDayIdstringYesID of the workout_plan_days row to delete.

Returns

Returns the result of this tool call as JSON.

workout_tracking_add_plan_exercise

Add a prescribed exercise target to a scheduled workout plan day. Supports strength targets (sets/reps/weight or %1RM/RPE) and cardio targets (duration/distance).

Parameters

NameTypeRequiredNotes
planDayIdstringYesID of the workout_plan_days row this exercise belongs to.
exercisestringYesName of the exercise, e.g. 'Bench Press' or 'Tempo Run'.
exercise_idstringNoExact exercises.id from workout_tracking_search_exercises. Skips automatic matching.
order_indexnumberNoSort order within the day, lower first. Defaults to 0.
target_setsnumberNo
target_repsnumberNo
target_weight_lbsnumberNo
target_percent_1rmnumberNoPrescribed load as a percentage of 1-rep max.
target_rpenumberNo
target_duration_minutesnumberNo
target_distance_milesnumberNo
notesstringNo

Returns

Returns the result of this tool call as JSON.

workout_tracking_update_plan_exercise

Update fields on an existing prescribed exercise target within a workout plan.

Parameters

NameTypeRequiredNotes
planExerciseIdstringYesID of the workout_plan_exercises row to update.
exercisestringNo
exercise_idstringNo
order_indexnumberNo
target_setsnumberNo
target_repsnumberNo
target_weight_lbsnumberNo
target_percent_1rmnumberNo
target_rpenumberNo
target_duration_minutesnumberNo
target_distance_milesnumberNo
notesstringNo

Returns

Returns the result of this tool call as JSON.

workout_tracking_delete_plan_exercise

Delete a prescribed exercise target from a workout plan day.

Parameters

NameTypeRequiredNotes
planExerciseIdstringYesID of the workout_plan_exercises row to delete.

Returns

Returns the result of this tool call as JSON.

workout_tracking_get_plan

Get a workout plan along with all of its scheduled days and each day's prescribed exercises.

Parameters

NameTypeRequiredNotes
planIdstringYesID of the workout_plans row to fetch.

Returns

Returns the result of this tool call as JSON.

workout_tracking_get_scheduled_workout

Resolve what's scheduled on a given date (defaults to today) for a workout plan: a specific_date override if one exists, otherwise the recurring day-of-week template for the plan's current week (accounting for ramping/multi-week cycles). Returns the matched day and its prescribed exercises, or null if nothing is scheduled.

Parameters

NameTypeRequiredNotes
planIdstringYesID of the workout_plans row to resolve against.
datestringNoDate to resolve. Defaults to today (UTC).

Returns

Returns the result of this tool call as JSON.

workout_tracking_plan_vs_actual

For every prescribed exercise in a workout plan, show its target alongside any logged exercises (and their sets) linked to it via plan_exercise_id on workout_tracking_log_set, plus which prescribed exercises have no matching logged exercise yet.

Parameters

NameTypeRequiredNotes
planIdstringYesID of the workout_plans row to compare.
startDatestringNoOnly consider workouts on or after this date.
endDatestringNoOnly consider workouts on or before this date.

Returns

Returns the result of this tool call as JSON.