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 | auto or manual |
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”auto — detected automatically
Section titled “auto — detected automatically”When an activity is processed, FitRepo checks whether the 20-minute best effort exceeds 95% of your current FTP (a common FTP proxy). If so, a new threshold row is written automatically with source = 'auto'.
Auto-detection is conservative — it only writes a new entry if the detected value is meaningfully higher than the current FTP, preventing noise from atypical efforts.
manual — set by you
Section titled “manual — set by you”You can set your FTP and LTHR manually in Settings → Thresholds. Manual entries always take precedence over auto-detected ones for the same effective_from date.
How FTP is applied to TSS
Section titled “How FTP is applied to TSS”When computing TSS for a historical activity, FitRepo finds the FTP row where effective_from is the most recent date ≤ the activity’s started_at. This means:
- Old activities use the FTP that was correct at the time.
- Updating your FTP today doesn’t retroactively change historical TSS.
- Your CTL/ATL history is stable.
Querying via MCP
Section titled “Querying via MCP”Use the get_thresholds tool:
# All FTP historyget_thresholds(metric: "ftp")
# LTHR history for a periodget_thresholds(metric: "lthr", from: "2024-01-01", to: "2025-01-01")
# All thresholds, all timeget_thresholds()Example response
Section titled “Example response”[ { "metric": "ftp", "value": 265, "effective_from": "2025-01-15", "source": "auto", "notes": null }, { "metric": "ftp", "value": 258, "effective_from": "2024-09-01", "source": "manual", "notes": "Post-summer ramp test" }]