Skip to main content
Glama

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
NameRequiredDescriptionDefault
device_idNoID do dispositivo (opcional)

Implementation Reference

  • 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)}`, }, ], }; } }
  • 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);

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/fborello/MCPSpotify'

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