Thresholds
FitRepo tracks your physiological thresholds historically so that TSS calculations and fitness analysis remain accurate as your fitness changes.
Metrics
Section titled “Metrics”| Metric key | Description | Unit |
|---|---|---|
ftp | Functional Threshold Power | watts |
lthr | Lactate Threshold Heart Rate | bpm |
Schema
Section titled “Schema”| Column | Type | Description |
|---|---|---|
id | UUID | Row identifier |
user_id | UUID | Owner |
metric | text | ftp or lthr |
value | real | Threshold value |
effective_from | date | Date from which this value applies |
source | text | device, manual, or test |
notes | text | Optional free-text note |
created_at | timestamptz | When the record was created |
Each (user_id, metric, effective_from) combination is unique. You can have multiple FTP values over time, each with a different effective_from date.
Sources
Section titled “Sources”device — reported by your device
Section titled “device — reported by your device”When a Wahoo activity is processed, FitRepo reads the thresholdPower field from the FIT file. If a value is present and differs from the most recent recorded FTP, a new threshold row is written automatically with source = 'device'.
manual and test — reserved for future use
Section titled “manual and test — reserved for future use”These source values are defined in the schema for future manual and test-based threshold entry. No write endpoint currently exists; all threshold rows are currently created automatically from device FIT data.
How TSS is stored
Section titled “How TSS is stored”TSS is parsed directly from the FIT file as recorded by your device. FitRepo stores this value as-is and uses it for CTL/ATL calculations. The user_thresholds history is retained for context but is not currently used to recalculate historical TSS values.
Querying via MCP
Section titled “Querying via MCP”Use the get_thresholds tool:
# All FTP historyget_thresholds(metric: "ftp")
# LTHR historyget_thresholds(metric: "lthr")
# All thresholds, all timeget_thresholds()Example response
Section titled “Example response”[ { "metric": "ftp", "value": 265, "effective_from": "2025-01-15", "source": "device", "notes": null }, { "metric": "ftp", "value": 258, "effective_from": "2024-09-01", "source": "manual", "notes": "Post-summer ramp test" }]