Tools Reference
import { Aside } from ‘@astrojs/starlight/components’;
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).
list_activities
Section titled “list_activities”Returns a paginated list of activities, newest first.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
sport | string | No | Filter by sport type (e.g. cycling, running, swimming) |
from | string | No | Start date (inclusive), e.g. 2025-01-01 |
to | string | No | End date (inclusive), e.g. 2025-03-31 |
limit | integer | No | Results per page (default 20, max 100) |
offset | integer | No | Pagination offset (default 0) |
Returns — array of activity summaries:
[ { "id": "uuid", "name": "Morning Ride", "sport_type": "cycling", "started_at": "2025-03-15T07:30:00Z", "duration_s": 3720, "distance_m": 48200, "elevation_gain_m": 420, "tss": 82, "normalized_power_w": 218, "intensity_factor": 0.87 }]Example prompt
“List my cycling activities from January 2025.”
get_activity
Section titled “get_activity”Returns full detail for a single activity, including all 25+ stored fields.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Activity UUID |
Returns — full activity object. See Activity Fields for the complete field list.
Example prompt
“Show me the details of my last race.”
get_fitness_timeline
Section titled “get_fitness_timeline”Returns daily CTL, ATL and TSB (training stress balance) for a date range.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
from | string | Yes | Start date, e.g. 2025-01-01 |
to | string | Yes | End date, e.g. 2025-03-31 |
Returns — array of daily values:
[ { "date": "2025-01-01", "ctl": 68.4, "atl": 72.1, "tsb": -3.7 }]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.”
get_best_efforts
Section titled “get_best_efforts”Returns mean-maximal power (MMP) records — your best average power for standard durations.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
from | string | No | Only consider activities on or after this date |
to | string | No | Only consider activities on or before this date |
Returns
{ "best_efforts": { "5": 412, "60": 380, "300": 318, "1200": 268, "3600": 238 }}Keys are duration in seconds; values are best average power in watts.
Standard durations: 5 s, 10 s, 30 s, 60 s, 5 min (300 s), 10 min (600 s), 20 min (1200 s), 30 min (1800 s), 60 min (3600 s).
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?”
get_wellness
Section titled “get_wellness”Returns wellness log entries (HRV, resting HR, sleep, readiness).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
from | string | No | Start date |
to | string | No | End date |
source | string | No | Filter by data source (e.g. oura, garmin, manual) |
Returns
[ { "date": "2025-03-15", "source": "oura", "rhr_bpm": 42, "hrv_rmssd": 68.2, "sleep_hours": 7.8, "readiness": 84 }]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.”
get_thresholds
Section titled “get_thresholds”Returns your FTP and lactate threshold heart rate (LTHR) history.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
metric | string | No | Filter by metric: ftp or lthr |
from | string | No | Start date |
to | string | No | End date |
Returns
[ { "metric": "ftp", "value": 265, "effective_from": "2025-01-15", "source": "auto", "notes": "Detected from activity best effort" }]source is auto (detected from activity data) or manual (entered by you in Settings).
See Thresholds for full documentation.
Example prompts
“How has my FTP changed over the last year?” “When did I last update my LTHR?”
get_profile
Section titled “get_profile”Returns your athlete profile.
Parameters — none.
Returns
{ "display_name": "Simon", "date_of_birth": "1988-04-12", "sex": "male", "height_cm": 178, "weight_kg": 72.5}Example prompt
“What’s my weight-to-power ratio based on my current FTP?”