Documentation
¶
Index ¶
- func FormatResponse(data []byte, client *strava.Client) *mcp.CallToolResult
- func HandleCheckUpdate(checker *update.Checker) server.ToolHandlerFunc
- func HandleCreateActivity(client *strava.Client) server.ToolHandlerFunc
- func HandleCreateUpload(client *strava.Client) server.ToolHandlerFunc
- func HandleGetActivities(client *strava.Client) server.ToolHandlerFunc
- func HandleGetActivityById(client *strava.Client) server.ToolHandlerFunc
- func HandleGetActivityStreams(client *strava.Client) server.ToolHandlerFunc
- func HandleGetActivityZones(client *strava.Client) server.ToolHandlerFunc
- func HandleGetAthlete(client *strava.Client) server.ToolHandlerFunc
- func HandleGetAthleteStats(client *strava.Client) server.ToolHandlerFunc
- func HandleGetClubActivities(client *strava.Client) server.ToolHandlerFunc
- func HandleGetUpload(client *strava.Client) server.ToolHandlerFunc
- func HandleSelfUpdate(checker *update.Checker, updater *update.Updater) server.ToolHandlerFunc
- func HandleToolError(toolName string, err error) *mcp.CallToolResult
- func HandleUpdateActivity(client *strava.Client) server.ToolHandlerFunc
- func RegisterAll(s *server.MCPServer, client *strava.Client)
- func RegisterUpdateTools(s *server.MCPServer, checker *update.Checker, updater *update.Updater)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatResponse ¶
func FormatResponse(data []byte, client *strava.Client) *mcp.CallToolResult
FormatResponse pretty-prints raw JSON data with 2-space indentation and conditionally appends a rate limit warning when API usage exceeds 80%. If the data is not valid JSON, returns the raw string as-is.
func HandleCheckUpdate ¶ added in v1.2.0
func HandleCheckUpdate(checker *update.Checker) server.ToolHandlerFunc
HandleCheckUpdate returns a handler for the strava_check_update tool.
func HandleCreateActivity ¶
func HandleCreateActivity(client *strava.Client) server.ToolHandlerFunc
HandleCreateActivity returns a handler for the create_activity tool.
func HandleCreateUpload ¶
func HandleCreateUpload(client *strava.Client) server.ToolHandlerFunc
HandleCreateUpload returns a handler for the create_upload tool.
func HandleGetActivities ¶
func HandleGetActivities(client *strava.Client) server.ToolHandlerFunc
HandleGetActivities returns a handler for the get_activities tool.
func HandleGetActivityById ¶
func HandleGetActivityById(client *strava.Client) server.ToolHandlerFunc
HandleGetActivityById returns a handler for the get_activity_by_id tool.
func HandleGetActivityStreams ¶
func HandleGetActivityStreams(client *strava.Client) server.ToolHandlerFunc
HandleGetActivityStreams returns a handler for the get_activity_streams tool.
func HandleGetActivityZones ¶
func HandleGetActivityZones(client *strava.Client) server.ToolHandlerFunc
HandleGetActivityZones returns a handler for the get_activity_zones tool.
func HandleGetAthlete ¶
func HandleGetAthlete(client *strava.Client) server.ToolHandlerFunc
HandleGetAthlete returns a handler for the get_athlete tool.
func HandleGetAthleteStats ¶
func HandleGetAthleteStats(client *strava.Client) server.ToolHandlerFunc
HandleGetAthleteStats returns a handler for the get_athlete_stats tool. When id is omitted (0), auto-fetches the authenticated athlete's ID first.
func HandleGetClubActivities ¶
func HandleGetClubActivities(client *strava.Client) server.ToolHandlerFunc
HandleGetClubActivities returns a handler for the get_club_activities tool.
func HandleGetUpload ¶
func HandleGetUpload(client *strava.Client) server.ToolHandlerFunc
HandleGetUpload returns a handler for the get_upload tool.
func HandleSelfUpdate ¶ added in v1.2.0
HandleSelfUpdate returns a handler for the strava_self_update tool. CRITICAL: This handler never calls os.Exit(). The MCP response must be sent before any process state changes.
func HandleToolError ¶
func HandleToolError(toolName string, err error) *mcp.CallToolResult
HandleToolError formats an error into an MCP error result. If the error is a StravaError, includes the HTTP status code and response body. Otherwise, includes the raw error message.
func HandleUpdateActivity ¶
func HandleUpdateActivity(client *strava.Client) server.ToolHandlerFunc
HandleUpdateActivity returns a handler for the update_activity tool. CRITICAL: Only sends user-provided fields to avoid zero-value overwrite.
func RegisterAll ¶
RegisterAll registers all MCP tools with the server.
func RegisterUpdateTools ¶ added in v1.2.0
RegisterUpdateTools registers the update MCP tools with the server. If checker or updater is nil, the corresponding tools are not registered. This is called separately from RegisterAll because update tools depend on *update.Checker/*update.Updater, not *strava.Client.
Types ¶
This section is empty.