Skip to content

Tools Reference

All tools authenticate via your personal API key (set in FITREPO_API_KEY). Date strings use ISO 8601 format (YYYY-MM-DD or full RFC 3339).


Returns a paginated list of activities, newest first.

Parameters

NameTypeRequiredDescription
sportstringNoFilter by sport type (e.g. cycling, running, swimming)
fromstringNoStart date (inclusive), e.g. 2025-01-01
tostringNoEnd date (inclusive), e.g. 2025-03-31
limitintegerNoResults per page (default 50, max 200)
offsetintegerNoPagination offset (default 0)

Returns

{
"activities": [
{
"id": "uuid",
"sport": "cycling",
"started_at": "2025-03-15T07:30:00Z",
"duration_secs": 3720,
"distance_meters": 48200,
"elevation_gain": 420,
"tss": 82,
"normalized_power": 218,
"intensity_factor": 0.87,
"avg_hr": 148,
"max_hr": 172
}
],
"total": null,
"offset": 0,
"limit": 50
}

Example prompt

“List my cycling activities from January 2025.”


Returns full detail for a single activity, including all stored fields, best efforts, and a fitness snapshot at the time of the activity.

Parameters

NameTypeRequiredDescription
idstringYesActivity UUID

Returns — full activity object plus a fitness_at_activity field:

{
"fitness_at_activity": {
"date": "2026-05-30",
"ctl": 68.4,
"atl": 82.1,
"tsb": -13.7,
"note": "Computed from power-based TSS only..."
}
}

fitness_at_activity is null if the activity has no date or there is no TSS history to compute from. TSB is positive when fresh, negative when fatigued. See Fitness Model for definitions.

Example prompts

“Show me the details of my last race.” “How fatigued was I during yesterday’s ride?” “Was my power output good given my fitness at the time?”


Returns the per-second data inside an activity’s stored FIT file, downsampled into time-aligned arrays — the shape of the ride rather than its summary.

Parameters

NameTypeRequiredDescription
idstringYesActivity UUID
resolutionnumberNoSeconds per bucket (default 5; 1 = full resolution)
channelsstring[]NoAny of power, heart_rate, cadence, altitude, speed, distance, grade, temperature, latitude, longitude. Default: all present except latitude/longitude
startOffsetnumberNoWindow start, seconds from activity start (inclusive)
endOffsetnumberNoWindow end, seconds from activity start (exclusive)

Returns — streams.time plus one array per channel, all the same length:

  • power is the bucket mean and power_max the bucket max, so short surges stay visible at 5 s.
  • heart_rate, cadence, speed, temperature are bucket means (cadence zeros are kept — coasting is signal).
  • altitude, distance, latitude, longitude are the last sample in the bucket; grade is derived from smoothed altitude and clamped to ±25%.
  • Buckets with no samples (sensor dropout, auto-pause) are null.
  • Channels with no sensor are listed in missingChannels.

Requests are capped at 3000 buckets: asking for 1 s over a whole long ride is coarsened automatically and a note explains why. Zoom with startOffset/endOffset to get 1 s detail. Returns an error if the original FIT file isn’t stored for the activity.

Example prompts

“Show me how my power and heart rate evolved over the first 20 minutes of the Gralloch.” “Where did I surge hardest in yesterday’s race?”


Returns device lap markers plus climbs detected from the altitude stream (useful when the lap button was never pressed).

Parameters

NameTypeRequiredDescription
idstringYesActivity UUID
detectClimbsbooleanNoDetect climbs from altitude (default true)

Returns — laps (source device) and climbs (source climb-detect). Each segment has startOffset, endOffset, durationSecs, distance_m, elevation_gain_m, avg_grade_pct, avg_power, np, avg_hr, max_hr, avg_cadence, avg_speed.

A climb is a sustained stretch at ≥3% grade, at least 500 m or 2 minutes long with ≥10 m gain; short dips (under 30 s or 200 m) are merged. Feed a segment’s offsets into get_activity_streams to zoom in.

Example prompts

“What were the climbs in my last race and how hard did I ride each one?” “How long was the opening climb and what was my NP on it?”


Returns daily CTL, ATL and TSB (training stress balance) for a date range.

Parameters

NameTypeRequiredDescription
fromstringNoStart date, e.g. 2025-01-01
tostringNoEnd date, e.g. 2025-03-31

Returns

{
"timeline": [
{
"date": "2025-01-01",
"ctl": 68.4,
"atl": 72.1,
"tsb": -3.7
}
],
"meta": {
"ctl_time_constant_days": 42,
"atl_time_constant_days": 7,
"note": "TSB = yesterday CTL − ATL. Positive = fresh, negative = fatigued."
}
}

See Fitness Model for how CTL/ATL/TSB are calculated.

Example prompts

“What was my CTL at the start of my build block in February?” “Plot my TSB over the last 3 months.”


Returns mean-maximal power (MMP) records — your best average power for standard durations — plus a per-activity breakdown.

Parameters

NameTypeRequiredDescription
sportstringNoSport to filter by (default: cycling)
fromstringNoOnly consider activities on or after this date
tostringNoOnly consider activities on or before this date

Returns

{
"sport": "cycling",
"from": null,
"to": null,
"all_time_best": {
"p5s": 920,
"p10s": 840,
"p30s": 620,
"p1m": 520,
"p2m": 460,
"p5m": 380,
"p10m": 340,
"p20m": 312,
"p60m": 268
},
"per_activity": [
{
"id": "uuid",
"started_at": "2025-03-15T07:30:00Z",
"best_efforts": { "p5s": 820, "p20m": 305 }
}
]
}

Duration keys: p5s (5 s), p10s, p30s, p1m, p2m, p5m, p10m, p20m, p60m — values are watts. A key is omitted from all_time_best if no activity has data for that duration.

See Best Efforts (MMP) for methodology.

Example prompts

“What’s my best 20-minute power in the last 6 months?” “How does my 5-second sprint compare to 12 months ago?”


Returns daily wellness: resting HR, HRV (RMSSD), sleep, weight, steps and readiness. By default you get one merged row per day, even if several sources (for example WHOOP and Intervals.icu) have data for it.

Parameters

NameTypeRequiredDescription
fromstringNoStart date
tostringNoEnd date
sourcestringNoOnly this source, as stored and unmerged (e.g. whoop, intervals, oura, manual)
mergebooleanNoDefault true. false returns a row for every source for every day, as stored

Returns

{
"merged": true,
"wellness": [
{
"date": "2026-10-14",
"weight_kg": 73,
"rhr_bpm": 52,
"hrv_rmssd": 38.8,
"sleep_hours": 6.65,
"sleep_score": 83,
"readiness": 51,
"steps": 6042,
"sources": { "recovery": "whoop", "weight": "intervals", "steps": "whoop" }
}
]
}

How the merge works

  • Recovery numbers come from one source per day. Resting HR, HRV, readiness and sleep hours/score are taken together from the highest-priority source that has any of them, because each device scores them differently — a day never mixes, say, WHOOP’s HRV with another device’s readiness. sources.recovery says which one.
  • Weight and steps are picked separately, each from the highest-priority source with a value (sources.weight, sources.steps).
  • Priority is yours to set: on the Backfill page’s Wellness data card, under Preferred source (it appears once you have more than one source), move sources up or down. With nothing saved the default order is devices read directly (WHOOP, Oura, Garmin, Polar, Withings, HRV4Training), then Intervals.icu, then manual entries.
  • For trends, stay on one source. If sources.recovery changes within a period, a jump in HRV or readiness may be the device, not you — Claude is told to say so.
  • Naming a source, or passing merge: false, gives the stored rows exactly ("merged": false).

See Wellness for field definitions.

Example prompts

“How does my HRV trend around hard training weeks?” “Show me my sleep hours and readiness scores for March.” “Compare my WHOOP and Intervals HRV this week.”


Pulls wellness data — weight, resting HR, HRV, sleep, steps and readiness — from Intervals.icu or WHOOP into FitRepo, so get_wellness has recent days. Use it when the latest days are missing. At least one of them must be connected (see get_backfill_status).

Parameters

NameTypeRequiredDescription
sourcestringNointervals, whoop, or all (every connected provider). Default: Intervals.icu if connected, otherwise WHOOP
fromstringNoStart date YYYY-MM-DD. Default: the last day already synced from that provider (so it continues where it left off), or 30 days ago the first time
tostringNoEnd date YYYY-MM-DD (default: today; can’t be in the future)

Returns

{ "source": "intervals", "from": "2026-09-29", "to": "2026-10-05", "fetched": 7, "stored": 6, "empty": 1, "latestDate": "2026-10-05" }

stored is the number of days saved or refreshed; empty counts days the provider had no values for. For WHOOP the result also has a whoop block — { cycles, sleeps, recoveries, days, cyclesWithoutSleep, sleepsWithoutCycle } — showing what WHOOP returned for the period. A new device that is still calibrating returns zeros (or cycles with no sleep yet); sleeps that don’t match any cycle would point to a problem worth reporting. With source: "all" you get { "results": [ … one per provider … ], "errors": [ … ] }, and one provider failing doesn’t stop the other.

How it works

  • Rows are saved with the provider as their source (intervals or whoop), one per day. If you use both, you’ll have two rows for a day — one per source — and they never overwrite each other. Syncing the same range again updates those days in place, so it is safe to repeat.
  • The last two days are always re-checked. Intervals.icu adds a day’s final step count the day after, and WHOOP can still be scoring a night’s recovery, so a day under ~48 hours old can still change; every sync (with no from) starts at least two days back and refreshes those days.
  • WHOOP days are dated by wake-up. WHOOP works in wake-to-wake cycles, so a night’s recovery and sleep are filed under the local date you woke up. Recovery maps to readiness (0–100), with HRV (RMSSD) and resting HR; sleep hours count time actually asleep (light + deep + REM), not time in bed. WHOOP workouts are not imported. See Connecting WHOOP.
  • Days with none of the stored metrics are skipped, not saved as blank rows.
  • Entries from other sources (for example manual) are never changed.
  • A range can be up to 366 days; up to 20 syncs per hour.
  • The Backfill page has the same thing as a Sync now button, plus an automatic daily sync you can switch on and set a time for — see Importing history.

Example prompts

“My wellness data stops last week — sync it.” “Sync my wellness from Intervals for September.” “Sync my WHOOP data.”


Returns your FTP and lactate threshold heart rate (LTHR) history.

Parameters

NameTypeRequiredDescription
metricstringNoFilter by metric: ftp or lthr — omit for all

Returns

{
"thresholds": [
{
"metric": "ftp",
"value": 265,
"effective_from": "2025-01-15",
"source": "device",
"notes": null
}
],
"note": "Use effective_from to find the threshold active on any given date."
}

source is device — read from the thresholdPower field in your device’s FIT file when it differs from your latest recorded value. manual and test are defined in the schema but reserved for future use.

See Thresholds for full documentation.

Example prompts

“How has my FTP changed over the last year?” “When did I last update my LTHR?”


Returns your athlete profile.

Parameters — none.

Returns

{
"date_of_birth": "1988-04-12",
"sex": "male",
"height_cm": 178,
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-03-15T09:00:00Z"
}

Returns {} if no profile has been set up yet.

Example prompt

“What’s my weight-to-power ratio based on my current FTP?”


Pushes planned workouts and race/note markers to your Intervals.icu calendar. Requires an Intervals.icu connection whose API key can write to the calendar. See Intervals.icu Integration.

Parameters

NameTypeRequiredDescription
workoutsobject[]YesOne or more events (fields below)
dryRunbooleanNoBuild the Intervals payloads and return them without calling the API

Each workout:

FieldTypeRequiredDescription
refstringYesYour stable id for this event. Re-pushing the same ref updates the event in place
datestringYesLocal date YYYY-MM-DD
timestringNoLocal start HH:mm (default 07:00 for workouts, 00:00 for notes/races)
namestringYesCalendar title
categorystringNoWORKOUT (default), NOTE, RACE_A, RACE_B, RACE_C, HOLIDAY, SICK, INJURED
typestringNoRide (default), Run, Swim, WeightTraining, …
indoorbooleanNoMark as an indoor (turbo/Zwift) session
descriptionstringNoIntervals workout text, e.g. - 15m 55% Warmup — percentages are %FTP
loadnumberNoPlanned TSS
movingTimenumberNoPlanned duration in seconds
colorstringNoColour for NOTE markers

Events are stored in Intervals with external_id = "fitrepo:<ref>", so FitRepo’s events never collide with other integrations. Every push writes an audit row. Your API key is never returned.

Example prompts

“Put this week’s sessions on my Intervals calendar.” “Add the Gralloch on 16 May as my A race.”


Reads planned events back off your Intervals.icu calendar — the reverse of create_planned_workouts. Use it to reschedule or edit workouts without creating duplicates.

Parameters

NameTypeRequiredDescription
oldeststringYesInclusive start date YYYY-MM-DD
neweststringYesInclusive end date YYYY-MM-DD
onlyFitrepobooleanNoOnly events FitRepo created (default true); false includes everything on the calendar
categoriesstring[]NoRestrict to categories, e.g. ["WORKOUT"] (default: all)

Returns

{
"ok": true,
"count": 1,
"rows": [
{
"ref": "p1-w2-fri-z2",
"id": 137794367,
"date": "2026-10-02",
"time": "12:30",
"name": "Lunch Z2",
"category": "WORKOUT",
"type": "Ride",
"load": 42,
"movingTime": 3600,
"description": "- 60m 60-70% Easy endurance"
}
]
}

To move or edit an event, pass its ref back to create_planned_workouts with the changed fields — the event updates in place. ref is null for events FitRepo didn’t create (made in the Intervals UI or by another integration); those can’t be moved this way. Every read writes an audit row.

Example prompts

“What’s on my calendar this week?” “Move any Z2 that falls the day before a long ride.”


Reports on imports from Wahoo and Intervals.icu: which sources are connected, your most recent stored activity, and recent import jobs.

Parameters

NameTypeRequiredDescription
jobIdsstring[]NoJobs to report on (default: the 3 most recent)
waitSecondsnumberNoWait up to this long (max 25) for running jobs to finish

Returns

{
"today": "2026-09-28",
"sources": { "wahoo": true, "intervals": true },
"lastActivity": { "id": "…", "started_at": "2026-09-27T08:02:11+00:00", "source": "intervals_backfill", "sport": "cycling" },
"suggestedFrom": "2026-09-27",
"wellness": { "latestDate": "2026-10-05", "lastSyncedAt": "2026-10-05T07:02:11.000Z",
"autoSync": { "enabled": true, "hour": 7, "timezone": "Europe/London" }, "lastError": null },
"jobs": [
{ "id": "…", "source": "intervals", "status": "completed", "from_date": "2026-09-27", "to_date": "2026-09-28",
"inRange": 2, "imported": 1, "skipped": 1, "failed": 0, "error": null }
]
}

suggestedFrom is the date of your latest stored activity — the natural start for “backfill new workouts”. If a running import has stalled, checking its status restarts it ("resumed": true).

wellness shows how current your wellness data is: the newest day stored, when it last synced, your automatic-sync schedule (null if never set) and the last error, if the most recent automatic sync failed. If latestDate is more than two days old, Claude will offer to run sync_wellness.

Failures. A job where some activities failed also includes a failures array explaining why, one entry per activity:

{
"failed": 8,
"error": "8/8 failed: fetch_fit 403",
"failures": [
{ "activityId": "i1234567", "date": "2019-06-03", "stage": "fetch_fit", "status": 403,
"message": "Intervals FIT i1234567 → 403: Forbidden" }
]
}
  • stage is where it failed: fetch_fit (downloading the file), parse or persist (saving the activity). status is the HTTP status for download failures.
  • Only the first 25 failures are kept; failuresTruncated: true means more activities failed than are listed.
  • If nothing imported and every attempted activity failed, the job’s error summarises the most common cause.
  • Messages never include your API key or file URLs.

File imports. A job started with start_file_import appears here too, with source: "file_import" and the provenance tag as importSource. For a dry run, imported stays 0 and counts gives the picture instead:

{
"source": "file_import", "importSource": "garmin_export", "status": "completed", "dryRun": true,
"counts": { "found": 812, "wouldImport": 640, "wouldSkip": 165, "unreadable": 7 },
"skips": [
{ "file": "export.zip/…/UploadedFiles_0.zip/9481123.fit", "kind": "duplicate",
"reason": "same start time and duration as an existing activity",
"matchedActivityId": "6f1c…", "matchedSource": "wahoo_webhook" }
],
"failures": [
{ "activityId": "export.zip/…/UploadedFiles_0.zip/7720011.fit", "date": "unknown",
"stage": "parse", "message": "FIT file is truncated or corrupt (header declares 9040112 bytes of data, file has 4210)" }
]
}

skips lists skipped files or rides (first 25, skipsTruncated: true if more) with the activity each one matched. Wahoo and Intervals.icu backfills report skipped duplicates here too. Failures for files use the archive path as activityId, and stage is read (couldn’t extract or upload it), parse or persist. An import whose local client stopped sending files is marked failed after 10 minutes.


Imports workouts from Wahoo and/or Intervals.icu (including Garmin and Zwift rides that reach Intervals) into FitRepo. Rides already stored are skipped.

Parameters

NameTypeRequiredDescription
sourcestringYeswahoo, intervals or both
fromstringNoStart date YYYY-MM-DD (default: the date of your latest stored activity)
tostringNoEnd date YYYY-MM-DD (default: today)
forcebooleanNoRe-import rides even if already stored (default false)

Returns — the date range and one jobId per source. Imports run in the background; call get_backfill_status with those ids (and waitSeconds) for the result.

If you don’t name a source and both are connected, Claude asks which to use. both imports a ride from each source it appears in — if Wahoo auto-syncs to Intervals, that means duplicates, so prefer the source the ride was recorded on. Up to 5 imports can be started per hour.

Example prompts

“Backfill new workouts.” “Pull in today’s ride from Intervals.” “Import everything from Wahoo since June.”


Imports activities from original files you already hold — a .zip of .fit, .gpx and .tcx files, including Garmin’s Export Your Data archive (a zip of zips), or a single activity file — with no third-party API involved. The archive is uploaded to FitRepo first, then imported on FitRepo’s servers. See Importing your own files.

Parameters

NameTypeRequiredDescription
upload_idstringNoId of an archive already uploaded to FitRepo. Omit to use your most recent upload
pathstringNoLocal package only (version 0.3.0 or later). Absolute path on your computer to a .zip (or a single .fit/.gpx/.tcx file); it is uploaded, then imported. The hosted connector refuses this — it can’t read your disk
sourcestringNoProvenance tag stored on each imported activity, e.g. garmin_export (default file_import). Lowercase letters, digits, _ or -
dryRunbooleanNoDefault true: parse and check for duplicates but store nothing; reports found / would-import / would-skip / unreadable. Pass false to import
forcebooleanNoImport even if a matching activity exists (the existing activity is kept)

Returns — { "jobId": "…", "uploadId": "…", "dryRun": true, "next": "…" } straight away. The import runs in the background on FitRepo; follow it with get_backfill_status using that jobId. With path, the local package returns { "state": "uploading", … } while it uploads; a job appears in get_backfill_status when the upload finishes, so keep Claude Desktop / Claude Code running until then.

How it works

  • FitRepo reads the archive and finds every .fit, .gpx and .tcx file anywhere inside it, opening nested zips — it doesn’t depend on Garmin’s folder layout. Nothing else in the archive is imported.
  • It’s a resumable background job: thousands of activities import in batches, and a dropped run picks up where it left off.
  • FitRepo parses each file and stores the original plus its summary, in the same shape as a synced ride, so get_activities, get_activity_streams and get_best_efforts work on it.
  • Duplicates are skipped. A file is a duplicate if an identical file is already stored, or if an existing activity starts within 60 seconds and has the same elapsed or moving duration within 1%. Duplicates inside the archive itself are skipped too, and re-running the same archive imports nothing new.
  • Non-activity FIT files (device settings, daily monitoring, …) are skipped, not failed. Unreadable or corrupt files are reported in failures.
  • No power meter? Rides without power import normally with power fields empty.
  • TSS and intensity factor are only stored when the file itself carries them (FIT files from devices that computed them at the time). They are never calculated from today’s FTP, because your FTP on the day of an old ride isn’t known.
  • The uploaded archive is deleted once a committed import finishes (it is kept if nothing in it could be read, so you can retry). A dry run keeps it for the commit run, which skips re-reading the archive’s contents. Unfinished uploads are discarded after 24 hours.
  • Limits: 4 MB per activity file; archives up to 20 GB; up to 10 file imports started per hour; up to 3 stored uploads.

Example prompts

“Do a dry run importing my latest upload.” “That looks right — import it for real, tagged garmin_export.”


Your coaching skill (how Claude should coach you) and training plans are stored in FitRepo as versioned markdown. They’re loaded lazily: on connect Claude only gets a two-sentence pointer, and a casual ride question never touches them. Manage them on the Coaching page — download, copy, upload, switch versions.

ToolWhat it does
get_active_documentsActive skill and plan — metadata only (slug, name, version, id, source). newerDefaultVersion is set when you run a customised skill and FitRepo ships a newer default.
get_documentFull markdown by id or slug (optionally slug@version).
upsert_documentSave a new version (type, content, optional slug, name, activate, basedOn). History is never overwritten; if the previous version was active, the new one becomes active.
set_active_documentMake a version active by id or slug. Activating the FitRepo default skill reverts to it.
list_documentsAll versions of your skills and plans, plus the shipped defaults. Metadata only.

Everyone starts on the FitRepo Coach skill — casual by default; it only coaches or builds a plan when you ask. Saving a skill under the fitrepo-coach slug creates your own copy, and later FitRepo updates never overwrite it.

Example prompts

“Plan my season around the Gralloch in May.” “Load my current plan — what’s this week?” “Save this plan to FitRepo and make it active.”