naftiko: 1.0.0-alpha2 info: label: Strava API — Activities description: 'Strava API — Activities. 7 operations. Lead operation: Create an Activity. Self-contained Naftiko capability covering one Strava business surface.' tags: - Strava - Activities created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: STRAVA_API_KEY: STRAVA_API_KEY capability: consumes: - type: http namespace: strava-activities baseUri: https://www.strava.com/api/v3 description: Strava API — Activities business capability. Self-contained, no shared references. resources: - name: activities path: /activities operations: - name: createactivity method: POST description: Create an Activity outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: activities-id path: /activities/{id} operations: - name: getactivitybyid method: GET description: Get Activity outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The identifier of the activity required: true - name: include_all_efforts in: query type: boolean description: To include all segment efforts in the response, set to true. Defaults to false. - name: updateactivitybyid method: PUT description: Update Activity outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The identifier of the activity required: true - name: body in: body type: object description: Request body (JSON). required: true - name: activities-id-comments path: /activities/{id}/comments operations: - name: getcommentsbyactivityid method: GET description: List Activity Comments outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The identifier of the activity required: true - name: page in: query type: integer description: Page number for pagination - name: per_page in: query type: integer description: Number of items per page - name: activities-id-kudos path: /activities/{id}/kudos operations: - name: getkudoersbyactivityid method: GET description: List Activity Kudoers outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The identifier of the activity required: true - name: page in: query type: integer description: Page number for pagination - name: per_page in: query type: integer description: Number of items per page - name: activities-id-laps path: /activities/{id}/laps operations: - name: getlapsbyactivityid method: GET description: List Activity Laps outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: The identifier of the activity required: true - name: athlete-activities path: /athlete/activities operations: - name: getloggedinathleteactivities method: GET description: List Athlete Activities outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: before in: query type: integer description: An epoch timestamp for filtering activities before a certain time - name: after in: query type: integer description: An epoch timestamp for filtering activities after a certain time - name: page in: query type: integer description: Page number for pagination - name: per_page in: query type: integer description: Number of items per page (max 200) authentication: type: bearer token: '{{env.STRAVA_API_KEY}}' exposes: - type: rest namespace: strava-activities-rest port: 8080 description: REST adapter for Strava API — Activities. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/activities name: activities description: REST surface for activities. operations: - method: POST name: createactivity description: Create an Activity call: strava-activities.createactivity with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/activities/{id} name: activities-id description: REST surface for activities-id. operations: - method: GET name: getactivitybyid description: Get Activity call: strava-activities.getactivitybyid with: id: rest.id include_all_efforts: rest.include_all_efforts outputParameters: - type: object mapping: $. - method: PUT name: updateactivitybyid description: Update Activity call: strava-activities.updateactivitybyid with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/activities/{id}/comments name: activities-id-comments description: REST surface for activities-id-comments. operations: - method: GET name: getcommentsbyactivityid description: List Activity Comments call: strava-activities.getcommentsbyactivityid with: id: rest.id page: rest.page per_page: rest.per_page outputParameters: - type: object mapping: $. - path: /v1/activities/{id}/kudos name: activities-id-kudos description: REST surface for activities-id-kudos. operations: - method: GET name: getkudoersbyactivityid description: List Activity Kudoers call: strava-activities.getkudoersbyactivityid with: id: rest.id page: rest.page per_page: rest.per_page outputParameters: - type: object mapping: $. - path: /v1/activities/{id}/laps name: activities-id-laps description: REST surface for activities-id-laps. operations: - method: GET name: getlapsbyactivityid description: List Activity Laps call: strava-activities.getlapsbyactivityid with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/athlete/activities name: athlete-activities description: REST surface for athlete-activities. operations: - method: GET name: getloggedinathleteactivities description: List Athlete Activities call: strava-activities.getloggedinathleteactivities with: before: rest.before after: rest.after page: rest.page per_page: rest.per_page outputParameters: - type: object mapping: $. - type: mcp namespace: strava-activities-mcp port: 9090 transport: http description: MCP adapter for Strava API — Activities. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: create-activity description: Create an Activity hints: readOnly: false destructive: false idempotent: false call: strava-activities.createactivity with: body: tools.body outputParameters: - type: object mapping: $. - name: get-activity description: Get Activity hints: readOnly: true destructive: false idempotent: true call: strava-activities.getactivitybyid with: id: tools.id include_all_efforts: tools.include_all_efforts outputParameters: - type: object mapping: $. - name: update-activity description: Update Activity hints: readOnly: false destructive: false idempotent: true call: strava-activities.updateactivitybyid with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: list-activity-comments description: List Activity Comments hints: readOnly: true destructive: false idempotent: true call: strava-activities.getcommentsbyactivityid with: id: tools.id page: tools.page per_page: tools.per_page outputParameters: - type: object mapping: $. - name: list-activity-kudoers description: List Activity Kudoers hints: readOnly: true destructive: false idempotent: true call: strava-activities.getkudoersbyactivityid with: id: tools.id page: tools.page per_page: tools.per_page outputParameters: - type: object mapping: $. - name: list-activity-laps description: List Activity Laps hints: readOnly: true destructive: false idempotent: true call: strava-activities.getlapsbyactivityid with: id: tools.id outputParameters: - type: object mapping: $. - name: list-athlete-activities description: List Athlete Activities hints: readOnly: true destructive: false idempotent: true call: strava-activities.getloggedinathleteactivities with: before: tools.before after: tools.after page: tools.page per_page: tools.per_page outputParameters: - type: object mapping: $.