naftiko: 1.0.0-alpha2 info: label: Spotify Web API — Tracks description: 'Spotify Web API — Tracks. 21 operations. Lead operation: Get Album Tracks. Self-contained Naftiko capability covering one Spotify business surface.' tags: - Spotify - Tracks created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: SPOTIFY_API_KEY: SPOTIFY_API_KEY capability: consumes: - type: http namespace: spotify-tracks baseUri: https://api.spotify.com/v1 description: Spotify Web API — Tracks business capability. Self-contained, no shared references. resources: - name: albums-id-tracks path: /albums/{id}/tracks operations: - name: getanalbumstracks method: GET description: Get Album Tracks outputRawFormat: json outputParameters: - name: result type: object value: $. - name: artists-id-top-tracks path: /artists/{id}/top-tracks operations: - name: getanartiststoptracks method: GET description: Get Artist's Top Tracks outputRawFormat: json outputParameters: - name: result type: object value: $. - name: audio-analysis-id path: /audio-analysis/{id} operations: - name: getaudioanalysis method: GET description: Get Track's Audio Analysis outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: audio-features path: /audio-features operations: - name: getseveralaudiofeatures method: GET description: Get Several Tracks' Audio Features outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: ids in: query type: string required: true - name: audio-features-id path: /audio-features/{id} operations: - name: getaudiofeatures method: GET description: Get Track's Audio Features outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: me-top-type path: /me/top/{type} operations: - name: getuserstopartistsandtracks method: GET description: Get User's Top Items outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: type in: path type: string required: true - name: time_range in: query type: string - name: me-tracks path: /me/tracks operations: - name: getuserssavedtracks method: GET description: Get User's Saved Tracks outputRawFormat: json outputParameters: - name: result type: object value: $. - name: savetracksuser method: PUT description: Save Tracks for Current User outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: removetracksuser method: DELETE description: Remove User's Saved Tracks outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: me-tracks-contains path: /me/tracks/contains operations: - name: checkuserssavedtracks method: GET description: Check User's Saved Tracks outputRawFormat: json outputParameters: - name: result type: object value: $. - name: playlists-playlist_id-items path: /playlists/{playlist_id}/items operations: - name: getplaylistsitems method: GET description: Get Playlist Items outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: fields in: query type: string - name: additemstoplaylist method: POST description: Add Items to Playlist outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: position in: query type: integer - name: uris in: query type: string - name: body in: body type: object description: Request body (JSON). required: false - name: reorderorreplaceplaylistsitems method: PUT description: Update Playlist Items outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: uris in: query type: string - name: body in: body type: object description: Request body (JSON). required: false - name: removeitemsplaylist method: DELETE description: Remove Playlist Items outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: playlists-playlist_id-tracks path: /playlists/{playlist_id}/tracks operations: - name: getplayliststracks method: GET description: Get Playlist Items [DEPRECATED] outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: fields in: query type: string - name: addtrackstoplaylist method: POST description: Add Items to Playlist [DEPRECATED] outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: position in: query type: integer - name: uris in: query type: string - name: body in: body type: object description: Request body (JSON). required: false - name: reorderorreplaceplayliststracks method: PUT description: Update Playlist Items [DEPRECATED] outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: uris in: query type: string - name: body in: body type: object description: Request body (JSON). required: false - name: removetracksplaylist method: DELETE description: Remove Playlist Items [DEPRECATED] outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: recommendations path: /recommendations operations: - name: getrecommendations method: GET description: Get Recommendations outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: limit in: query type: integer - name: seed_artists in: query type: string required: true - name: seed_genres in: query type: string required: true - name: seed_tracks in: query type: string required: true - name: min_acousticness in: query type: number - name: max_acousticness in: query type: number - name: target_acousticness in: query type: number - name: min_danceability in: query type: number - name: max_danceability in: query type: number - name: target_danceability in: query type: number - name: min_duration_ms in: query type: integer - name: max_duration_ms in: query type: integer - name: target_duration_ms in: query type: integer - name: min_energy in: query type: number - name: max_energy in: query type: number - name: target_energy in: query type: number - name: min_instrumentalness in: query type: number - name: max_instrumentalness in: query type: number - name: target_instrumentalness in: query type: number - name: min_key in: query type: integer - name: max_key in: query type: integer - name: target_key in: query type: integer - name: min_liveness in: query type: number - name: max_liveness in: query type: number - name: target_liveness in: query type: number - name: min_loudness in: query type: number - name: max_loudness in: query type: number - name: target_loudness in: query type: number - name: min_mode in: query type: integer - name: max_mode in: query type: integer - name: target_mode in: query type: integer - name: min_popularity in: query type: integer - name: max_popularity in: query type: integer - name: target_popularity in: query type: integer - name: min_speechiness in: query type: number - name: max_speechiness in: query type: number - name: target_speechiness in: query type: number - name: min_tempo in: query type: number - name: max_tempo in: query type: number - name: target_tempo in: query type: number - name: min_time_signature in: query type: integer - name: max_time_signature in: query type: integer - name: target_time_signature in: query type: integer - name: min_valence in: query type: number - name: max_valence in: query type: number - name: target_valence in: query type: number - name: tracks path: /tracks operations: - name: getseveraltracks method: GET description: Get Several Tracks outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: ids in: query type: string required: true - name: tracks-id path: /tracks/{id} operations: - name: gettrack method: GET description: Get Track outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true authentication: type: bearer token: '{{env.SPOTIFY_API_KEY}}' exposes: - type: rest namespace: spotify-tracks-rest port: 8080 description: REST adapter for Spotify Web API — Tracks. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/albums/{id}/tracks name: albums-id-tracks description: REST surface for albums-id-tracks. operations: - method: GET name: getanalbumstracks description: Get Album Tracks call: spotify-tracks.getanalbumstracks outputParameters: - type: object mapping: $. - path: /v1/artists/{id}/top-tracks name: artists-id-top-tracks description: REST surface for artists-id-top-tracks. operations: - method: GET name: getanartiststoptracks description: Get Artist's Top Tracks call: spotify-tracks.getanartiststoptracks outputParameters: - type: object mapping: $. - path: /v1/audio-analysis/{id} name: audio-analysis-id description: REST surface for audio-analysis-id. operations: - method: GET name: getaudioanalysis description: Get Track's Audio Analysis call: spotify-tracks.getaudioanalysis with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/audio-features name: audio-features description: REST surface for audio-features. operations: - method: GET name: getseveralaudiofeatures description: Get Several Tracks' Audio Features call: spotify-tracks.getseveralaudiofeatures with: ids: rest.ids outputParameters: - type: object mapping: $. - path: /v1/audio-features/{id} name: audio-features-id description: REST surface for audio-features-id. operations: - method: GET name: getaudiofeatures description: Get Track's Audio Features call: spotify-tracks.getaudiofeatures with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/me/top/{type} name: me-top-type description: REST surface for me-top-type. operations: - method: GET name: getuserstopartistsandtracks description: Get User's Top Items call: spotify-tracks.getuserstopartistsandtracks with: type: rest.type time_range: rest.time_range outputParameters: - type: object mapping: $. - path: /v1/me/tracks name: me-tracks description: REST surface for me-tracks. operations: - method: GET name: getuserssavedtracks description: Get User's Saved Tracks call: spotify-tracks.getuserssavedtracks outputParameters: - type: object mapping: $. - method: PUT name: savetracksuser description: Save Tracks for Current User call: spotify-tracks.savetracksuser with: body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: removetracksuser description: Remove User's Saved Tracks call: spotify-tracks.removetracksuser with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/me/tracks/contains name: me-tracks-contains description: REST surface for me-tracks-contains. operations: - method: GET name: checkuserssavedtracks description: Check User's Saved Tracks call: spotify-tracks.checkuserssavedtracks outputParameters: - type: object mapping: $. - path: /v1/playlists/{playlist-id}/items name: playlists-playlist-id-items description: REST surface for playlists-playlist_id-items. operations: - method: GET name: getplaylistsitems description: Get Playlist Items call: spotify-tracks.getplaylistsitems with: fields: rest.fields outputParameters: - type: object mapping: $. - method: POST name: additemstoplaylist description: Add Items to Playlist call: spotify-tracks.additemstoplaylist with: position: rest.position uris: rest.uris body: rest.body outputParameters: - type: object mapping: $. - method: PUT name: reorderorreplaceplaylistsitems description: Update Playlist Items call: spotify-tracks.reorderorreplaceplaylistsitems with: uris: rest.uris body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: removeitemsplaylist description: Remove Playlist Items call: spotify-tracks.removeitemsplaylist with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/playlists/{playlist-id}/tracks name: playlists-playlist-id-tracks description: REST surface for playlists-playlist_id-tracks. operations: - method: GET name: getplayliststracks description: Get Playlist Items [DEPRECATED] call: spotify-tracks.getplayliststracks with: fields: rest.fields outputParameters: - type: object mapping: $. - method: POST name: addtrackstoplaylist description: Add Items to Playlist [DEPRECATED] call: spotify-tracks.addtrackstoplaylist with: position: rest.position uris: rest.uris body: rest.body outputParameters: - type: object mapping: $. - method: PUT name: reorderorreplaceplayliststracks description: Update Playlist Items [DEPRECATED] call: spotify-tracks.reorderorreplaceplayliststracks with: uris: rest.uris body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: removetracksplaylist description: Remove Playlist Items [DEPRECATED] call: spotify-tracks.removetracksplaylist with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/recommendations name: recommendations description: REST surface for recommendations. operations: - method: GET name: getrecommendations description: Get Recommendations call: spotify-tracks.getrecommendations with: limit: rest.limit seed_artists: rest.seed_artists seed_genres: rest.seed_genres seed_tracks: rest.seed_tracks min_acousticness: rest.min_acousticness max_acousticness: rest.max_acousticness target_acousticness: rest.target_acousticness min_danceability: rest.min_danceability max_danceability: rest.max_danceability target_danceability: rest.target_danceability min_duration_ms: rest.min_duration_ms max_duration_ms: rest.max_duration_ms target_duration_ms: rest.target_duration_ms min_energy: rest.min_energy max_energy: rest.max_energy target_energy: rest.target_energy min_instrumentalness: rest.min_instrumentalness max_instrumentalness: rest.max_instrumentalness target_instrumentalness: rest.target_instrumentalness min_key: rest.min_key max_key: rest.max_key target_key: rest.target_key min_liveness: rest.min_liveness max_liveness: rest.max_liveness target_liveness: rest.target_liveness min_loudness: rest.min_loudness max_loudness: rest.max_loudness target_loudness: rest.target_loudness min_mode: rest.min_mode max_mode: rest.max_mode target_mode: rest.target_mode min_popularity: rest.min_popularity max_popularity: rest.max_popularity target_popularity: rest.target_popularity min_speechiness: rest.min_speechiness max_speechiness: rest.max_speechiness target_speechiness: rest.target_speechiness min_tempo: rest.min_tempo max_tempo: rest.max_tempo target_tempo: rest.target_tempo min_time_signature: rest.min_time_signature max_time_signature: rest.max_time_signature target_time_signature: rest.target_time_signature min_valence: rest.min_valence max_valence: rest.max_valence target_valence: rest.target_valence outputParameters: - type: object mapping: $. - path: /v1/tracks name: tracks description: REST surface for tracks. operations: - method: GET name: getseveraltracks description: Get Several Tracks call: spotify-tracks.getseveraltracks with: ids: rest.ids outputParameters: - type: object mapping: $. - path: /v1/tracks/{id} name: tracks-id description: REST surface for tracks-id. operations: - method: GET name: gettrack description: Get Track call: spotify-tracks.gettrack with: id: rest.id outputParameters: - type: object mapping: $. - type: mcp namespace: spotify-tracks-mcp port: 9090 transport: http description: MCP adapter for Spotify Web API — Tracks. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-album-tracks description: Get Album Tracks hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.getanalbumstracks outputParameters: - type: object mapping: $. - name: get-artist-s-top-tracks description: Get Artist's Top Tracks hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.getanartiststoptracks outputParameters: - type: object mapping: $. - name: get-track-s-audio-analysis description: Get Track's Audio Analysis hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.getaudioanalysis with: id: tools.id outputParameters: - type: object mapping: $. - name: get-several-tracks-audio-features description: Get Several Tracks' Audio Features hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.getseveralaudiofeatures with: ids: tools.ids outputParameters: - type: object mapping: $. - name: get-track-s-audio-features description: Get Track's Audio Features hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.getaudiofeatures with: id: tools.id outputParameters: - type: object mapping: $. - name: get-user-s-top-items description: Get User's Top Items hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.getuserstopartistsandtracks with: type: tools.type time_range: tools.time_range outputParameters: - type: object mapping: $. - name: get-user-s-saved-tracks description: Get User's Saved Tracks hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.getuserssavedtracks outputParameters: - type: object mapping: $. - name: save-tracks-current-user description: Save Tracks for Current User hints: readOnly: false destructive: false idempotent: true call: spotify-tracks.savetracksuser with: body: tools.body outputParameters: - type: object mapping: $. - name: remove-user-s-saved-tracks description: Remove User's Saved Tracks hints: readOnly: false destructive: true idempotent: true call: spotify-tracks.removetracksuser with: body: tools.body outputParameters: - type: object mapping: $. - name: check-user-s-saved-tracks description: Check User's Saved Tracks hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.checkuserssavedtracks outputParameters: - type: object mapping: $. - name: get-playlist-items description: Get Playlist Items hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.getplaylistsitems with: fields: tools.fields outputParameters: - type: object mapping: $. - name: add-items-playlist description: Add Items to Playlist hints: readOnly: false destructive: false idempotent: false call: spotify-tracks.additemstoplaylist with: position: tools.position uris: tools.uris body: tools.body outputParameters: - type: object mapping: $. - name: update-playlist-items description: Update Playlist Items hints: readOnly: false destructive: false idempotent: true call: spotify-tracks.reorderorreplaceplaylistsitems with: uris: tools.uris body: tools.body outputParameters: - type: object mapping: $. - name: remove-playlist-items description: Remove Playlist Items hints: readOnly: false destructive: true idempotent: true call: spotify-tracks.removeitemsplaylist with: body: tools.body outputParameters: - type: object mapping: $. - name: get-playlist-items-deprecated description: Get Playlist Items [DEPRECATED] hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.getplayliststracks with: fields: tools.fields outputParameters: - type: object mapping: $. - name: add-items-playlist-deprecated description: Add Items to Playlist [DEPRECATED] hints: readOnly: true destructive: false idempotent: false call: spotify-tracks.addtrackstoplaylist with: position: tools.position uris: tools.uris body: tools.body outputParameters: - type: object mapping: $. - name: update-playlist-items-deprecated description: Update Playlist Items [DEPRECATED] hints: readOnly: false destructive: false idempotent: true call: spotify-tracks.reorderorreplaceplayliststracks with: uris: tools.uris body: tools.body outputParameters: - type: object mapping: $. - name: remove-playlist-items-deprecated description: Remove Playlist Items [DEPRECATED] hints: readOnly: false destructive: true idempotent: true call: spotify-tracks.removetracksplaylist with: body: tools.body outputParameters: - type: object mapping: $. - name: get-recommendations description: Get Recommendations hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.getrecommendations with: limit: tools.limit seed_artists: tools.seed_artists seed_genres: tools.seed_genres seed_tracks: tools.seed_tracks min_acousticness: tools.min_acousticness max_acousticness: tools.max_acousticness target_acousticness: tools.target_acousticness min_danceability: tools.min_danceability max_danceability: tools.max_danceability target_danceability: tools.target_danceability min_duration_ms: tools.min_duration_ms max_duration_ms: tools.max_duration_ms target_duration_ms: tools.target_duration_ms min_energy: tools.min_energy max_energy: tools.max_energy target_energy: tools.target_energy min_instrumentalness: tools.min_instrumentalness max_instrumentalness: tools.max_instrumentalness target_instrumentalness: tools.target_instrumentalness min_key: tools.min_key max_key: tools.max_key target_key: tools.target_key min_liveness: tools.min_liveness max_liveness: tools.max_liveness target_liveness: tools.target_liveness min_loudness: tools.min_loudness max_loudness: tools.max_loudness target_loudness: tools.target_loudness min_mode: tools.min_mode max_mode: tools.max_mode target_mode: tools.target_mode min_popularity: tools.min_popularity max_popularity: tools.max_popularity target_popularity: tools.target_popularity min_speechiness: tools.min_speechiness max_speechiness: tools.max_speechiness target_speechiness: tools.target_speechiness min_tempo: tools.min_tempo max_tempo: tools.max_tempo target_tempo: tools.target_tempo min_time_signature: tools.min_time_signature max_time_signature: tools.max_time_signature target_time_signature: tools.target_time_signature min_valence: tools.min_valence max_valence: tools.max_valence target_valence: tools.target_valence outputParameters: - type: object mapping: $. - name: get-several-tracks description: Get Several Tracks hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.getseveraltracks with: ids: tools.ids outputParameters: - type: object mapping: $. - name: get-track description: Get Track hints: readOnly: true destructive: false idempotent: true call: spotify-tracks.gettrack with: id: tools.id outputParameters: - type: object mapping: $.