Skip to main content
Glama

skip_to_next

Skip to the next track in Spotify playback with immediate results, allowing quick navigation through playlists, albums, or queues based on user preferences or commands. Returns updated track details and playback status.

Instructions

Skip to the next track in the user's playback queue or playlist.

🎯 USE CASES: • Skip songs that don't match current mood or activity • Navigate through playlists and albums quickly • Build custom music control interfaces • Create voice-activated skip commands • Implement automatic skipping based on user preferences

📝 WHAT IT RETURNS: • Information about the new track that started playing • Updated playback position reset to beginning • Queue information showing remaining tracks • Confirmation of successful skip operation • Device state with new playback status

🔍 EXAMPLES: • "Skip to the next song" • "Play the next track in this playlist" • "Move forward to the next song" • "I don't like this song, skip it"

🎵 SKIP BEHAVIOR: • Follows playlist/album order when not shuffled • Respects shuffle mode for random progression • May trigger repeat behavior at end of playlists • Updates listening history and statistics • Can trigger discovery algorithms for similar music

⚠️ REQUIREMENTS: • Valid Spotify access token with user-modify-playback-state scope • Active playback session with available next track • User must have appropriate device control permissions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdNoSpotify device ID (optional, uses active device if not specified)
tokenYesSpotify access token for authentication

Implementation Reference

  • Primary registration of the 'skip_to_next' MCP tool, defining its metadata, input schema, and handler function that delegates to SpotifyService
    skip_to_next: { title: "Skip to Next Track", description: `Skip to the next track in the user's playback queue or playlist. 🎯 USE CASES: • Skip songs that don't match current mood or activity • Navigate through playlists and albums quickly • Build custom music control interfaces • Create voice-activated skip commands • Implement automatic skipping based on user preferences 📝 WHAT IT RETURNS: • Information about the new track that started playing • Updated playback position reset to beginning • Queue information showing remaining tracks • Confirmation of successful skip operation • Device state with new playback status 🔍 EXAMPLES: • "Skip to the next song" • "Play the next track in this playlist" • "Move forward to the next song" • "I don't like this song, skip it" 🎵 SKIP BEHAVIOR: • Follows playlist/album order when not shuffled • Respects shuffle mode for random progression • May trigger repeat behavior at end of playlists • Updates listening history and statistics • Can trigger discovery algorithms for similar music ⚠️ REQUIREMENTS: • Valid Spotify access token with user-modify-playback-state scope • Active playback session with available next track • User must have appropriate device control permissions`, schema: createSchema({ token: commonSchemas.token(), deviceId: commonSchemas.deviceId(), }), handler: async (args: any, spotifyService: SpotifyService) => { const { token, deviceId } = args; return await spotifyService.skipToNext(token, deviceId); }, },
  • Core handler logic in SpotifyService that executes the Spotify API call to skip to the next track
    async skipToNext( token: string, deviceId: string | null = null ): Promise<void> { const endpoint = deviceId ? `me/player/next?device_id=${deviceId}` : "me/player/next"; return await this.makeRequest<void>(endpoint, token, {}, "POST"); }
  • Input schema validation for the skip_to_next tool requiring token and optional deviceId
    schema: createSchema({ token: commonSchemas.token(), deviceId: commonSchemas.deviceId(), }),
  • Thin wrapper handler in the tool definition that parses args and calls the Spotify service method
    handler: async (args: any, spotifyService: SpotifyService) => { const { token, deviceId } = args; return await spotifyService.skipToNext(token, deviceId); },
  • Aggregates all tools including playbackTools (containing skip_to_next) into the central allTools registry used by ToolRegistrar for MCP exposure
    export const allTools: ToolsRegistry = { ...albumTools, ...artistTools, ...trackTools, ...playlistTools, ...playbackTools, ...userTools, ...searchTools, };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/latiftplgu/Spotify-OAuth-MCP-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server