Search Spotify
search_musicFinds tracks, albums, artists, or playlists on Spotify using a query plus optional filters for year, genre, artist, and album, with pagination to page through large result sets.
Instructions
Search Spotify for tracks, albums, artists, or playlists.
Args:
query: Search query
qtype: Type ('track', 'album', 'artist', 'playlist')
limit: Max results per page (1-50, default 10). Spotify caps search at 10
per page for restricted apps and rejects anything larger; a larger
limit is retried at the cap rather than failing. Check the returned
`limit` for what was actually served, and use `offset` to go deeper.
offset: Number of results to skip for pagination (default 0)
year: Filter by year (e.g., '2024')
year_range: Filter by year range (e.g., '2020-2024')
genre: Filter by genre (e.g., 'electronic', 'hip-hop')
artist: Filter by artist name
album: Filter by album name
Returns:
SearchResults with 'items' (list of tracks) and pagination info ('total', 'limit', 'offset')
Note: Filters use Spotify's search syntax. For large result sets, use offset to paginate.
Example: query='love', year='2024', genre='pop' searches for 'love year:2024 genre:pop'
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_music"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | ||
| album | No | ||
| genre | No | ||
| limit | No | ||
| qtype | No | track | |
| query | Yes | ||
| artist | No | ||
| offset | No | ||
| year_range | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | No | ||
| items | Yes | ||
| limit | Yes | ||
| total | Yes | ||
| offset | Yes | ||
| previous | No |