Skip to main content
Glama

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
NameRequiredDescriptionDefault
deviceIdNoThe Spotify device ID to pause playback on

Implementation Reference

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

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