Tools, resources and prompts¶
The server registers 33 tools, 12 resources and 5 prompts. Mirror SQL/schema/status and prompt retrieval are local-only. Other reads are cache-first except upload status, which always calls Strava. Preserve provenance/coverage notices (see How sync works).
Start with strava://reference/usage, strava://mirror/status, strava://mirror/schema and strava://mirror/budget: these cost zero API calls. The usage guide lists every URI template and prompt, with bounded examples, even for clients that hide template discovery or initialize instructions. Unknown/missing rate headers are not free calls. Local pagination can follow a full upstream list refresh; check budget before broad reads and reconcile ambiguous writes before retrying.
Compatible text results remain available. Bounded JSON results also carry structured data; mirrored results use { data, _provenance }. SQL and schema tools declare validated output schemas; provider-dependent payloads deliberately do not. Oversized generic text is explicitly truncated (and structured data omitted); SQL truncates rows to its character budget while keeping valid JSON. Resources reject oversized bodies rather than corrupting JSON/XML.
The mirror¶
strava_query¶
Query the Strava Mirror (SQL)
Run a read-only DuckDB SQL query against the athlete's stored Strava data (possibly incomplete; check sync status). Enforced read-only transaction, 30 seconds, 5000 rows maximum; no file/network access. Use strava_schema first to see the tables. Main tables: activity, activity_stream_point (per-point streams: time, distance, lat, lng, altitude, heartrate, cadence, watts, temp, velocity_smooth, grade_smooth), activity_lap, activity_split, activity_best_effort, activity_segment_effort, segment, activity_zone_bucket, gear, route, athlete_stats. Units: meters, seconds, m/s. raw_current holds every payload as JSON (column body) for fields not in a typed table. Costs no Strava API calls.
local read-only, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
sql |
string | yes | One DuckDB SELECT statement (DESCRIBE, SUMMARIZE and EXPLAIN also work). |
max_rows |
integer (min 1, max 5000) | no | Maximum rows to return (default 200). Default 200. |
strava_schema¶
Describe the Strava Mirror
List the mirror's tables and views with their descriptions and row counts, or, given a table name, its columns with types, units and descriptions. Use before strava_query.
local read-only, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
table |
string | no | A table or view name; omit to list them all. |
strava_sync_status¶
Strava Mirror Sync Status
How complete and fresh the local mirror is: activity coverage (details, streams, zones), the sync queue by kind, last run of each periodic task, recent errors, and unmapped fields. Zero API calls. Rate status distinguishes header observations from local estimates and unknown pools; missing headers never mean free calls. Check this or strava://mirror/budget before broad remote reads; 429 cooldown/reset times apply to all priorities.
local read-only, idempotent.
No parameters.
Streams¶
strava_get_activity_streams¶
Get Activity Streams
Get high-resolution time-series data for an activity (heart rate, power, cadence, altitude, GPS coordinates, etc.). Data is downsampled if too large. Cache miss normally costs one API request. Missing stream rate headers mean unknown accounting, not free calls; check strava_sync_status or strava://mirror/budget first.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
activity_id |
integer | yes | The activity ID |
keys |
array of time, distance, latlng, altitude, velocity_smooth, heartrate, cadence, watts, temp, moving, grade_smooth |
yes | Stream types to retrieve: time, distance, latlng, altitude, velocity_smooth, heartrate, cadence, watts, temp, moving, grade_smooth |
max_points |
integer (min 10, max 2000) | no | Maximum data points to return (10-2000, default 500). Streams are downsampled if larger. Default 500. |
strava_get_segment_effort_streams¶
Get Segment Effort Streams
Get bounded/downsampled time-series data for a segment effort. Cache miss normally costs one API request; check strava_sync_status or strava://mirror/budget. Missing headers do not exempt requests from known quotas.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
effort_id |
string | yes | The segment effort ID |
keys |
array of time, distance, latlng, altitude, velocity_smooth, heartrate, cadence, watts, temp, moving, grade_smooth |
yes | Stream types to retrieve |
max_points |
integer (min 10, max 2000) | no | Maximum data points to return (10-2000, default 500). Streams are downsampled if larger. Default 500. |
strava_get_segment_streams¶
Get Segment Streams
Get bounded/downsampled GPS, distance and altitude data for a segment. Cache miss normally costs one API request; check strava_sync_status or strava://mirror/budget first.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
segment_id |
integer | yes | The segment ID |
keys |
array of latlng, distance, altitude |
yes | Stream types: latlng, distance, altitude |
max_points |
integer (min 10, max 2000) | no | Maximum data points to return (10-2000, default 500). Streams are downsampled if larger. Default 500. |
strava_get_route_streams¶
Get Route Streams
Get bounded/downsampled GPS, distance and altitude data for a route. A cache refresh normally costs one API request; check strava_sync_status or strava://mirror/budget first.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
route_id |
string | yes | The route ID |
max_points |
integer (min 10, max 2000) | no | Maximum data points to return (10-2000, default 500). Streams are downsampled if larger. Default 500. |
Uploads¶
strava_get_upload¶
Get Upload Status
Read upload processing status directly from Strava (one API request per call, never mirrored). Returns status, error and the resulting activity ID. Poll sparingly; check strava_sync_status or strava://mirror/budget and respect cooldown.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
upload_id |
integer | yes | The upload ID |
strava_create_upload¶
Upload Activity File
Upload an activity file (FIT, TCX, GPX) to create a new activity (one API request plus later status polls). Requires activity:write. Maximum decoded file size 25 MiB; canonical base64 only. Do not replay a lost response; reconcile first. Returns an upload ID for strava_get_upload.
writes to Strava.
| Parameter | Type | Required | Description |
|---|---|---|---|
file_content |
string | yes | Base64-encoded file content (maximum decoded size 25 MiB) |
data_type |
fit, fit.gz, tcx, tcx.gz, gpx, gpx.gz |
yes | File format: fit, fit.gz, tcx, tcx.gz, gpx, gpx.gz |
name |
string | no | Activity name |
description |
string | no | Activity description |
trainer |
boolean | no | Whether this is a trainer/indoor activity |
commute |
boolean | no | Whether this is a commute |
external_id |
string | no | External identifier for deduplication |
Routes¶
strava_list_athlete_routes¶
List Athlete Routes
Page through stored routes. Refresh fetches all upstream pages; local per_page does not cap API request cost.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
athlete_id |
integer | no | Ignored: Strava serves only the authenticated athlete's routes, which the mirror holds. Kept for compatibility. |
page |
integer (min 1, max 1000000) | no | Local page number (1-1000000, default 1); upstream refresh may traverse all pages Default 1. |
per_page |
integer (min 1, max 200) | no | Results per page (1-200, default 30) Default 30. |
strava_get_route¶
Get Route
Get detailed route information including distance, elevation gain, and estimated moving time.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
route_id |
string | yes | The route ID |
strava_export_route_gpx¶
Export Route as GPX
Export a route as a GPX file. Returns raw GPX XML content.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
route_id |
string | yes | The route ID |
strava_export_route_tcx¶
Export Route as TCX
Export a route as a TCX file. Returns raw TCX XML content.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
route_id |
string | yes | The route ID |
Clubs¶
strava_list_athlete_clubs¶
List Athlete Clubs
Page through stored clubs the athlete belongs to. Refresh fetches all upstream pages; local per_page does not cap API request cost.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
page |
integer (min 1, max 1000000) | no | Local page number (1-1000000, default 1); upstream refresh may traverse all pages Default 1. |
per_page |
integer (min 1, max 200) | no | Results per page (1-200, default 30) Default 30. |
strava_get_club¶
Get Club
Get detailed information about a club including description, member count, and sport type.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
club_id |
integer | yes | The club ID |
Gear¶
strava_get_gear¶
Get Gear
Get equipment details by ID (name, brand, model, total distance). Gear IDs look like "b12345" for bikes or "g12345" for shoes.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
gear_id |
string | yes | The gear ID (e.g. "b12345" for a bike, "g12345" for shoes) |
Segments¶
strava_list_starred_segments¶
List Starred Segments
Page through stored starred segments. A stale refresh fetches the complete upstream list (multiple API pages); local per_page does not cap request cost.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
page |
integer (min 1, max 1000000) | no | Local page number (1-1000000, default 1); upstream refresh may traverse all pages Default 1. |
per_page |
integer (min 1, max 200) | no | Results per page (1-200, default 30) Default 30. |
strava_get_segment¶
Get Segment
Get detailed information about a segment including distance, elevation, grade, effort count, and athlete count.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
segment_id |
integer | yes | The segment ID |
strava_list_segment_efforts¶
List Segment Efforts
List the authenticated athlete's efforts on a segment, newest first, optionally filtered by date range. Limited to per_page results (no next-page cursor). Mirror history can be incomplete; fallback fetches all upstream pages before slicing, so per_page does not cap API calls. Check strava_sync_status or strava://mirror/budget; prefer stored SQL when budget is tight.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
segment_id |
integer | yes | The segment ID |
start_date_local |
string or string | no | Filter efforts after this ISO 8601 date |
end_date_local |
string or string | no | Filter efforts before this ISO 8601 date |
per_page |
integer (min 1, max 200) | no | Results per page (1-200, default 30) Default 30. |
strava_get_segment_effort¶
Get Segment Effort
Get a specific segment effort by ID, including elapsed time, heart rate, watts, and achievements.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
effort_id |
string | yes | The segment effort ID |
strava_star_segment¶
Star/Unstar Segment
Star or unstar a segment for the authenticated athlete (one write API request). Unstarring removes an existing preference. Reconcile a lost response before retrying.
writes to Strava, destructive, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
segment_id |
integer | yes | The segment ID |
starred |
boolean | yes | True to star, false to unstar |
strava_export_segment_gpx¶
Export Segment as GPX
Export a Strava segment as a GPX file for navigation. Returns GPX XML that can be imported into Garmin Connect, Coros, or other GPS devices. Note: The Strava API does not support uploading routes, so the GPX must be imported manually into your device/app.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
segment_id |
integer | yes | The segment ID |
Activities¶
strava_list_activities¶
List Athlete Activities
List the authenticated athlete's activities, newest first. Supports filtering by date range and pagination. Served from stored history, which can be incomplete during backfill. A stale listing refresh traverses upstream pages; local page size does not cap API requests. Check strava_sync_status or strava://mirror/budget before broad refreshes; narrow dates/use local SQL first.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
before |
integer (min 0) | no | Only activities before this epoch timestamp (seconds) |
after |
integer (min 0) | no | Only activities after this epoch timestamp (seconds) |
page |
integer (min 1, max 1000000) | no | Local page number (1-1000000, default 1); upstream refresh may traverse all pages Default 1. |
per_page |
integer (min 1, max 200) | no | Results per page (1-200, default 30) Default 30. |
strava_get_activity¶
Get Activity
Get detailed information about a specific activity including description, calories, splits, laps, segment efforts, best efforts, and gear. Served from the local mirror; recent activities are refreshed from Strava.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
activity_id |
integer | yes | The activity ID |
include_all_efforts |
boolean | no | Ignored: the mirror stores every segment effort and always returns them all. Kept for compatibility. |
strava_create_activity¶
Create Activity
Create a manual activity entry (one API request). Requires activity:write scope and intent. Do not blindly retry a lost response; duplicate creation is possible.
writes to Strava.
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | The name of the activity |
sport_type |
one of 50 values (AlpineSki, BackcountrySki, Badminton, Canoeing, Crossfit, EBikeRide, ...) |
yes | The sport type (e.g. Run, Ride, Swim, Hike) |
start_date_local |
string | yes | ISO 8601 date/time for activity start in local timezone (e.g. 2024-01-15T08:30:00Z) |
elapsed_time |
integer (min 1) | yes | Total elapsed time in seconds |
description |
string | no | Activity description |
distance |
number (min 0) | no | Distance in meters |
trainer |
boolean | no | Whether this was a trainer/indoor activity |
commute |
boolean | no | Whether this was a commute |
strava_update_activity¶
Update Activity
Update an activity's mutable properties. Requires activity:write scope. Only provided fields are updated (one API request); replacing values can destroy prior content. Reconcile lost responses before retrying.
writes to Strava, destructive, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
activity_id |
integer | yes | The activity ID to update |
name |
string | no | New name |
sport_type |
one of 50 values (AlpineSki, BackcountrySki, Badminton, Canoeing, Crossfit, EBikeRide, ...) |
no | New sport type |
description |
string | no | New description |
gear_id |
string or string | no | Gear ID to associate (e.g. "b12345"), or "none" to remove |
trainer |
boolean | no | Whether this is a trainer activity |
commute |
boolean | no | Whether this is a commute |
hide_from_home |
boolean | no | Whether to mute this activity in the feed |
strava_list_activity_comments¶
List Activity Comments
Page through stored comments. A cache refresh fetches the entire upstream list, potentially many API pages regardless of per_page.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
activity_id |
integer | yes | The activity ID |
page |
integer (min 1, max 1000000) | no | Local page number (1-1000000, default 1); upstream refresh may traverse all pages Default 1. |
per_page |
integer (min 1, max 200) | no | Results per page (1-200, default 30) Default 30. |
strava_list_activity_kudoers¶
List Activity Kudoers
Page through stored kudoers. A cache refresh fetches the entire upstream list, potentially many API pages regardless of per_page.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
activity_id |
integer | yes | The activity ID |
page |
integer (min 1, max 1000000) | no | Local page number (1-1000000, default 1); upstream refresh may traverse all pages Default 1. |
per_page |
integer (min 1, max 200) | no | Results per page (1-200, default 30) Default 30. |
strava_list_activity_laps¶
List Activity Laps
List laps of an activity. Each lap includes distance, time, speed, heart rate, watts, and elevation.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
activity_id |
integer | yes | The activity ID |
strava_list_activity_zones¶
List Activity Zones
Get heart rate and power zone distribution for an activity. Shows time spent in each zone.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
activity_id |
integer | yes | The activity ID |
Athlete¶
strava_get_authenticated_athlete¶
Get Authenticated Athlete
Get the profile of the currently authenticated athlete, including name, location, stats summary, bikes, and shoes.
cache-first/remote read, idempotent.
No parameters.
strava_get_athlete_zones¶
Get Athlete Zones
Get the authenticated athlete's heart rate and power zones.
cache-first/remote read, idempotent.
No parameters.
strava_get_athlete_stats¶
Get Athlete Stats
Get activity statistics for the authenticated athlete: recent, year-to-date, and all-time totals for runs, rides, and swims. Includes biggest ride distance and biggest climb.
cache-first/remote read, idempotent.
| Parameter | Type | Required | Description |
|---|---|---|---|
athlete_id |
integer | no | Ignored: Strava serves stats only for the authenticated athlete, which the mirror holds. Kept for compatibility. |
Resources¶
Read-only context a client can pull into a conversation.
| URI | Description |
|---|---|
strava://athlete/profile |
Authenticated athlete profile, bikes and shoes, with provenance. Cache-first; refresh costs one API request. |
strava://athlete/stats |
Year-to-date/all-time run, ride and swim totals with provenance. Cache-first; refresh costs one API request. |
strava://reference/sport-types |
Valid Strava sport_type values for create/update activity and for interpreting activity data. |
strava://reference/stream-types |
Available stream types for the stream tools. Pass one or more keys as the keys parameter. |
strava://reference/usage |
Start here: zero-call guide listing every URI template and workflow prompt with bounded examples, API costs, budgets, safe retries and coverage guidance. |
strava://mirror/schema |
Tables/views, units and approximate counts; local only, zero API calls. Read /schema/{table} for columns. |
strava://mirror/status |
Local coverage, queue, recent errors and cached rate/webhook status. Does not sync or contact Strava. |
strava://mirror/budget |
Header observations, conservative estimates, unknown pools, reserve shares and reset/cooldown times; zero API calls. |
strava://activity/{activityId} |
Detailed activity with provenance. Cache-first; a missing/stale detail can cost one API request. Large bodies fail with a size notice; use SQL for bounded fields. |
strava://segment/{segmentId} |
Detailed segment with provenance. Cache-first; a refresh costs one API request. |
strava://route/{routeId}/gpx |
Route GPX body plus separate provenance. Cache-first; refresh costs one API request. No file is written. Oversized content is rejected, not silently truncated. |
strava://mirror/schema/{table} |
Columns, types, units and comments for one local table/view. Zero API calls. |
Prompts¶
Local-only workflow templates: no refresh, queueing or API calls during retrieval. Refresh missing context with tools separately; the prompts preserve observation times and warn about incomplete coverage or a 200-item cap.
| Prompt | Arguments | Description |
|---|---|---|
weekly-summary |
week_start? |
Summarize a UTC week from at most 200 stored activities, with coverage/provenance. Local only, zero API calls; refresh via tools separately if needed. |
activity-analysis |
activity_id |
Analyze a stored activity and stream summaries with provenance. Local only, zero API calls; missing streams are disclosed. Refresh via tools separately. |
training-plan-review |
days? |
Review 1-365 days of stored training (at most 200 activities) with coverage/provenance. Local only, zero API calls; refresh with tools separately. |
segment-comparison |
segment_id |
Compare up to 200 stored efforts on a segment with coverage/provenance, not necessarily all efforts. Local only, zero API calls; refresh via tools separately. |
race-readiness |
distance? |
Assess readiness using stored profile/stats and up to 200 activities over 90 days. Local only, zero API calls; preserve coverage limitations and refresh via tools separately. |