Skip to main content
Glama

skipToNext

Advance to the next track in your current Spotify playback queue. Use this tool to control music progression during listening sessions.

Instructions

Skip to the next track in the current Spotify playback queue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdNoThe Spotify device ID to skip on

Implementation Reference

  • The handler function that performs the skip to next track action using the Spotify API.
    handler: async (args, _extra: SpotifyHandlerExtra) => { const { deviceId } = args; await handleSpotifyRequest(async (spotifyApi) => { await spotifyApi.player.skipToNext(deviceId || ''); }); return { content: [ { type: 'text', text: 'Skipped to next track', }, ], }; },
  • Input schema using Zod for the skipToNext tool, defining optional deviceId parameter.
    schema: { deviceId: z .string() .optional() .describe('The Spotify device ID to skip on'), },
  • src/index.ts:12-14 (registration)
    Registration of all tools, including skipToNext via playTools, to the MCP server.
    [...readTools, ...playTools, ...albumTools].forEach((tool) => { server.tool(tool.name, tool.description, tool.schema, tool.handler); });
  • src/play.ts:502-502 (registration)
    skipToNext tool included in the playTools export array for registration.
    skipToNext,

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/marcelmarais/spotify-mcp-server'

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