Get Playlist Tracks
get_playlist_tracksRetrieve tracks from a Spotify playlist with pagination controls, returning item details, total count, limit, and offset so you can fetch specific track ranges or all tracks safely.
Instructions
Get tracks from a playlist with full pagination support.
Args:
playlist_id: Playlist ID
limit: Max tracks to return (None for all tracks, up to 10,000 safety limit)
offset: Number of tracks to skip for pagination (default 0)
Returns:
PlaylistTracks with 'items' (list of tracks), 'total', 'limit', 'offset'
Note: Large playlists require pagination. Use limit/offset to get specific ranges:
- Get first 100: limit=100, offset=0
- Get next 100: limit=100, offset=100
- Get all tracks: limit=None (use with caution on very large playlists)
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": {
"playlist_id": "<playlist_id>"
},
"name": "get_playlist_tracks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | ||
| playlist_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| limit | No | ||
| total | Yes | ||
| offset | Yes | ||
| returned | Yes |