pause_player
Pause Spotify music playback while preserving the current position and queue state. Use this tool to temporarily stop music during calls, meetings, or when needing to pause playback without losing your place.
Instructions
Pause the current music playback while maintaining position and queue state.
π― USE CASES: β’ Pause music during calls, meetings, or conversations β’ Create automatic pause triggers for smart home systems β’ Implement voice commands for hands-free control β’ Pause playback when leaving designated areas β’ Build custom music control interfaces with pause functionality
π WHAT IT RETURNS: β’ Confirmation of successful pause operation β’ Final playback position before pausing β’ Current track information preserved for resume β’ Device state showing paused status β’ Queue information maintained for later resume
π EXAMPLES: β’ "Pause my music" β’ "Stop playing on my bedroom speaker" β’ "Pause the current track" β’ "Hold the music for a moment"
π‘ PAUSE BENEFITS: β’ Preserves exact playback position for seamless resume β’ Maintains queue, shuffle, and repeat settings β’ Keeps track information available for display β’ Allows for quick resume without losing context
β οΈ REQUIREMENTS: β’ Valid Spotify access token with user-modify-playback-state scope β’ Active playback session must be running β’ User must have appropriate device permissions
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Spotify access token for authentication | |
| deviceId | No | Spotify device ID (optional, uses active device if not specified) |
Implementation Reference
- src/mcp/tools/playback.ts:201-204 (handler)The core handler function for the 'pause_player' MCP tool. It destructures the input arguments and delegates to the SpotifyService.pausePlayback method to pause the playback.handler: async (args: any, spotifyService: SpotifyService) => { const { token, deviceId } = args; return await spotifyService.pausePlayback(token, deviceId); },
- src/mcp/tools/playback.ts:197-200 (schema)The Zod-based input schema definition for the 'pause_player' tool, specifying the required 'token' and optional 'deviceId' parameters.schema: createSchema({ token: commonSchemas.token(), deviceId: commonSchemas.deviceId(), }),
- src/spotify.ts:655-663 (helper)The SpotifyService helper method that implements the actual Spotify API call to pause playback on the specified device.async pausePlayback( token: string, deviceId: string | null = null ): Promise<void> { const endpoint = deviceId ? `me/player/pause?device_id=${deviceId}` : "me/player/pause"; return await this.makeRequest<void>(endpoint, token, {}, "PUT"); }
- src/mcp/tools/playback.ts:163-205 (registration)The complete tool definition object for 'pause_player', including title, description, schema, and handler, which is exported as part of playbackTools and registered via ToolRegistrar.pause_player: { title: "Pause Player", description: `Pause the current music playback while maintaining position and queue state. π― USE CASES: β’ Pause music during calls, meetings, or conversations β’ Create automatic pause triggers for smart home systems β’ Implement voice commands for hands-free control β’ Pause playback when leaving designated areas β’ Build custom music control interfaces with pause functionality π WHAT IT RETURNS: β’ Confirmation of successful pause operation β’ Final playback position before pausing β’ Current track information preserved for resume β’ Device state showing paused status β’ Queue information maintained for later resume π EXAMPLES: β’ "Pause my music" β’ "Stop playing on my bedroom speaker" β’ "Pause the current track" β’ "Hold the music for a moment" π‘ PAUSE BENEFITS: β’ Preserves exact playback position for seamless resume β’ Maintains queue, shuffle, and repeat settings β’ Keeps track information available for display β’ Allows for quick resume without losing context β οΈ REQUIREMENTS: β’ Valid Spotify access token with user-modify-playback-state scope β’ Active playback session must be running β’ User must have appropriate device permissions`, schema: createSchema({ token: commonSchemas.token(), deviceId: commonSchemas.deviceId(), }), handler: async (args: any, spotifyService: SpotifyService) => { const { token, deviceId } = args; return await spotifyService.pausePlayback(token, deviceId); }, },