Search Spotify tracks
search_tracksSearch the Spotify catalog for ranked, unique track entries with ready-to-use URIs for building playlists; read-only and does not modify the user's account.
Instructions
Search the Spotify catalog for tracks.
Returns unique, ranked, compact track entries. Each uri (spotify:track:…) can be passed
directly to add_tracks_to_playlist.track_uris. Read-only; nothing in the user's account
changes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_tracks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of results to fetch (1-30). Ask for everything you need in one call instead of paging yourself; duplicates are removed within a call, so slightly fewer tracks may come back. | |
| query | Yes | Free-text search, e.g. 'bohemian rhapsody queen'. Field filters narrow results: artist:<name>, track:<title>, album:<name>, year:<YYYY or YYYY-YYYY>, genre:<name>. | |
| offset | No | Index of the first result; only needed to continue from `next_offset`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| total | Yes | Total matches as reported by Spotify (approximate; can include duplicates). | |
| tracks | Yes | Unique tracks in Spotify's ranking order. | |
| next_offset | Yes | Pass as `offset` to continue after these results; null if there are no more. | |
| duplicates_removed | Yes | Tracks Spotify returned more than once in this call, which were dropped. |