add_custom_exercise
ChatGPTUse this when the user wants an exercise the library does not have, such as a gym-specific machine or a variation, added to their own Reps exercises. Search get_exercise_library FIRST: a match comes back as already_exists instead of a duplicate. Fill in muscle_groups and equipment from what the user described, and tell the user in one sentence what you assumed. The exercise is created at once, and the returned slug / exercise_id work in save_routine, save_plan and edit_routine straight away. To change it later, use update_custom_exercise.
edit_routine
ChatGPTUse this when the user wants to change one of their saved Reps routines: swap, add or remove exercises, or change sets, targets, order or name. First call get_routines for its routine_id, current exercises and updated_at. This writes straight away: tell the user exactly what will change (what is added, removed or adjusted) and wait for an explicit yes in this conversation. Send the FULL end state in exercises, every exercise the routine should contain, in order; anything left out is removed. A timed hold or cardio takes target_duration_seconds instead of target_reps. Pass the updated_at you read as base_updated_at: if the routine changed in the Reps app since, nothing is saved and the result is routine_changed. The result lists the routine as it now stands. The change shows up in the Reps app after its next sync (up to 5 minutes) or when the app is reopened.
get_exercise_library
ChatGPTUse this when you need an exercise's slug for another Reps tool, or the user asks which exercises exist for a muscle group or equipment. Searches built-in and custom exercises by search (a name, any app language), muscle_group and/or equipment. Each result has its slug and the user's own note on it, or null.
get_exercise_progression
ChatGPTUse this when the user asks how one exercise has progressed over time ("how has my bench press progressed?"). Returns one point per training day for exercise_slug, from from to to (default: the last 90 days); metric is max_weight (default), estimated_1rm (Epley) or volume. An unknown slug comes back with candidates, logged ones first.
get_personal_records
ChatGPTUse this when the user asks about their personal records ("what are my PRs?", "what is my heaviest squat?"). Each record has a record_type ('max_weight' kg, 'max_reps' count, 'max_volume' weight×reps, 'estimated_1rm' kg) and a numeric value. Filter by exercise_slug and/or kind, or omit both for all. An unknown slug comes back with candidates.
get_routines
ChatGPTUse this when the user asks about their saved routines ("show me my Push routine") or before changing one. Returns routines in any plan or none, each with its exercises (default_sets, notes) and in_plans (plans using it, with day_of_week). Filter by routine_id or a name search, or omit both for all. Each routine carries updated_at: pass it as base_updated_at to edit_routine, which refuses the edit if the routine changed in the Reps app after you read it.
get_stats_overview
ChatGPTUse this when the user asks for an overview of their training over a period, such as volume trends or muscle-group balance. Totals from from to to (default: the last 30 days): workouts, volume, weekly volume trend, muscle distribution and the top 5 exercises.
get_training_plan
ChatGPTUse this when the user asks what to train today or next, or about their current training plan. Returns the active plan, its routines and exercises, and a next_routine: today's in a fixed-day plan, the next one in a rotation.
get_weekly_summary
ChatGPTUse this when the user asks how a given week of training went ("how was last week?"). Totals for one Monday–Sunday week (week_offset 0 = this week, -1 = last week): workouts_count, total_volume_kg, total_duration_seconds, muscle_distribution, and is_partial=true for the current week.
get_workout_history
ChatGPTUse this when the user asks what they did in past gym workouts: exercises, sets, reps and weights ("show my last 5 workouts", "what did I do this week?"). Returns finished workouts, newest first, with their exercises, sets and routine_name (the routine it was started from, or null). Filter by from / to and exercise_slugs; defaults to the last 30 days and 20 workouts, at most 100 per call. It has only what was logged in the Reps app (sets, reps, weights, durations): no heart rate, pace, GPS or data from a watch or another app, so do not call it for those.
save_plan
ChatGPTUse this when the user wants a whole training plan (several routines on a schedule, such as a push/pull/legs split) saved to their Reps account, including a plan they bring as a photo, PDF, spreadsheet or pasted text. This writes straight away: first describe the plan to the user (its routines, their exercises and the schedule) and wait for an explicit yes in this conversation. schedule_type is "rotation" (routines run in order, no weekdays) or "fixed_days" (every routine needs a distinct day_of_week, 1 = Monday … 7 = Sunday). To reuse a routine the user already has, pass its routine_id from get_routines: it is LINKED, not copied, and keeps its own name. Otherwise give its name and exercises, with slugs or ids from get_exercise_library (a timed hold or cardio takes target_duration_seconds instead of target_reps). For a plan the user brought, read it yourself, look every exercise up, and add what the library lacks with add_custom_exercise before saving; an unknown exercise is refused with candidates. The plan becomes the active one unless you pass activate: false; that stops the previously active plan, which the result names in replaced_plan, so tell the user. It shows up in the Reps app after its next sync (up to 5 minutes) or when the app is reopened; say so.
save_routine
ChatGPTUse this when the user wants a new workout routine saved to their Reps account ("build me a 60-minute push routine and save it"). This writes straight away: first describe the routine to the user in plain words (its name and each exercise with sets, reps and weight) and wait for an explicit yes in this conversation. A routine is a reusable template, not a log of a finished workout. Reference exercises by exercise_slug or exercise_id from get_exercise_library; one the library does not have is refused with candidates: retry with one only when it is clearly what the user meant, otherwise ask. target_reps is a rep count; for a timed hold or cardio (plank, wall sit, rowing) leave it out and give the time per set in target_duration_seconds (45 for "45 s"). rest_seconds may be 0 (a superset). The result lists what was saved by name. The routine shows up in the Reps app after its next sync (up to 5 minutes) or when the app is reopened; say so.
set_exercise_note
ChatGPTUse this when the user asks to add, change or clear their own note on an exercise, built-in or custom ("note on my bench: seat 4, pause on the chest"). The note is a short gym-floor cue the Reps app shows on the exercise and during a workout; a custom exercise's step-by-step how-to goes in notes on update_custom_exercise instead. Get the slug and the current note from get_exercise_library. note replaces the whole note (to add to it, send the old text plus the new); an empty note clears it. Applied at once, with no confirmation step, so use it when the user asks for the note or has just agreed to it, and say in one sentence what the note now says.
update_custom_exercise
ChatGPTUse this when the user asks to rename, re-file or rewrite the how-to of one of their OWN custom exercises. Find the slug with get_exercise_library (only is_custom: true rows qualify; built-ins return not_custom). Send only the fields that change: name, muscle_groups, equipment, type, unilateral, or notes, the step-by-step how-to shown on the exercise, one step per line. Applied at once, with no confirmation step, so use it when the user asks for the change or has just agreed to it, and say in one sentence what you changed.
add_custom_exercise
Claudeedit_routine
Claudeget_exercise_library
Claudeget_exercise_progression
Claudeget_personal_records
Claudeget_routines
Claudeget_stats_overview
Claudeget_training_plan
Claudeget_weekly_summary
Claudeget_workout_history
Claudesave_plan
Claudesave_routine
Claudeset_exercise_note
Claudeupdate_custom_exercise
Claude