skipToNext
Advances playback to the next track in your current Spotify queue. Use this tool to skip songs during listening sessions.
Instructions
Skip to the next track in the current Spotify playback queue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deviceId | No | The Spotify device ID to skip on |
Implementation Reference
- src/play.ts:116-131 (handler)The handler function for the 'skipToNext' tool. It extracts the optional deviceId from args, calls handleSpotifyRequest to execute spotifyApi.player.skipToNext on the specified or default device, and returns a success message.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', }, ], }; },
- src/play.ts:110-115 (schema)The Zod input schema for the 'skipToNext' tool, defining an optional deviceId string.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 from playTools, by calling server.tool() for each.[...readTools, ...playTools, ...albumTools].forEach((tool) => { server.tool(tool.name, tool.description, tool.schema, tool.handler); });
- src/play.ts:365-365 (registration)skipToNext tool is included in the exported playTools array.skipToNext,