spotify_next
Skip to the next track in your Spotify playback queue. Use this tool to advance music playback and control your listening experience.
Instructions
Pula para a próxima música
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | No | ID do dispositivo (opcional) |
Implementation Reference
- src/tools/spotify-tools.ts:244-270 (handler)Executes the spotify_next tool by skipping to the next track using the Spotify API's skipToNext method, handling optional device_id and returning success/error messages.async next(deviceId?: string) { try { await this.spotifyAuth.ensureValidToken(); const spotifyApi = this.spotifyAuth.getSpotifyApi(); const options = deviceId ? { device_id: deviceId } : {}; await spotifyApi.skipToNext(options); return { content: [ { type: 'text', text: '⏭️ Pulou para a próxima música', }, ], }; } catch (error) { return { content: [ { type: 'text', text: `❌ Erro ao pular música: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } }
- src/index.ts:135-147 (schema)Defines the input schema and metadata for the spotify_next tool in the list of available tools.{ name: 'spotify_next', description: 'Pula para a próxima música', inputSchema: { type: 'object', properties: { device_id: { type: 'string', description: 'ID do dispositivo (opcional)', }, }, }, },
- src/index.ts:280-281 (registration)Registers and dispatches the spotify_next tool call to the SpotifyTools.next() method.case 'spotify_next': return await spotifyTools.next(args.device_id);