pausePlayback
Pause music playback on Spotify devices. Control audio streaming by stopping playback on active or specified devices.
Instructions
Pause Spotify playback on the active device
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deviceId | No | The Spotify device ID to pause playback on |
Implementation Reference
- src/play.ts:87-102 (handler)The handler function for the pausePlayback tool. It extracts the deviceId from args, calls handleSpotifyRequest to pause playback via Spotify API, and returns a success message.handler: async (args, _extra: SpotifyHandlerExtra) => { const { deviceId } = args; await handleSpotifyRequest(async (spotifyApi) => { await spotifyApi.player.pausePlayback(deviceId || ''); }); return { content: [ { type: 'text', text: 'Playback paused', }, ], }; },
- src/play.ts:81-86 (schema)Zod input schema defining optional deviceId parameter for the pausePlayback tool.schema: { deviceId: z .string() .optional() .describe('The Spotify device ID to pause playback on'), },
- src/play.ts:499-510 (registration)The pausePlayback tool is registered by being included in the exported playTools array, likely used for MCP tool registration.export const playTools = [ playMusic, pausePlayback, skipToNext, skipToPrevious, createPlaylist, addTracksToPlaylist, resumePlayback, addToQueue, setVolume, adjustVolume, ];