resume_player
Resume Spotify playback exactly where it paused, on the same or a different device, maintaining queue order, shuffle, repeat, and volume settings. Requires a valid Spotify access token and an existing playback session.
Instructions
Resume paused playback or continue playing from where the user left off.
🎯 USE CASES: • Resume music after phone calls or interruptions • Continue playback when returning to apps or devices • Implement "play/pause" toggle functionality • Resume listening after switching between devices • Restore playback state in smart home automations
📝 WHAT IT RETURNS: • Confirmation of resumed playback • Current track and position information • Updated playback state showing active play • Device information where playback resumed • Remaining track duration and queue preview
🔍 EXAMPLES: • "Resume my music where I left off" • "Continue playing on my phone" • "Resume the playlist I was listening to" • "Start playing again on my smart speaker"
💡 SMART RESUME: • Picks up exactly where playback was paused • Maintains queue order and shuffle settings • Preserves repeat mode and volume level • Can resume on the same or different device
⚠️ REQUIREMENTS: • Valid Spotify access token with user-modify-playback-state scope • Previous playback session must exist to resume • Target device must be available and active
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contextUri | No | ||
| deviceId | No | Spotify device ID (optional, uses active device if not specified) | |
| token | Yes | Spotify access token for authentication | |
| trackUris | No |
Implementation Reference
- src/mcp/tools/playback.ts:152-160 (handler)The handler function that executes the core logic of the 'resume_player' tool by calling the SpotifyService.resumePlayback method with destructured arguments.handler: async (args: any, spotifyService: SpotifyService) => { const { token, contextUri, trackUris, deviceId } = args; return await spotifyService.resumePlayback( token, contextUri, trackUris, deviceId ); },
- src/mcp/tools/playback.ts:140-151 (schema)The Zod input schema for the 'resume_player' tool, validating token, optional contextUri, trackUris array, and deviceId.schema: createSchema({ token: commonSchemas.token(), contextUri: z .string() .optional() .describe("Spotify context URI (album, playlist, artist) to play"), trackUris: z .array(z.string()) .optional() .describe("Array of track URIs to play"), deviceId: commonSchemas.deviceId(), }),
- src/mcp/tools/playback.ts:106-161 (registration)The complete tool registration object for 'resume_player' within the playbackTools export, including title, description, schema, and handler.resume_player: { title: "Resume Player", description: `Resume paused playback or continue playing from where the user left off. 🎯 USE CASES: • Resume music after phone calls or interruptions • Continue playback when returning to apps or devices • Implement "play/pause" toggle functionality • Resume listening after switching between devices • Restore playback state in smart home automations 📝 WHAT IT RETURNS: • Confirmation of resumed playback • Current track and position information • Updated playback state showing active play • Device information where playback resumed • Remaining track duration and queue preview 🔍 EXAMPLES: • "Resume my music where I left off" • "Continue playing on my phone" • "Resume the playlist I was listening to" • "Start playing again on my smart speaker" 💡 SMART RESUME: • Picks up exactly where playback was paused • Maintains queue order and shuffle settings • Preserves repeat mode and volume level • Can resume on the same or different device ⚠️ REQUIREMENTS: • Valid Spotify access token with user-modify-playback-state scope • Previous playback session must exist to resume • Target device must be available and active`, schema: createSchema({ token: commonSchemas.token(), contextUri: z .string() .optional() .describe("Spotify context URI (album, playlist, artist) to play"), trackUris: z .array(z.string()) .optional() .describe("Array of track URIs to play"), deviceId: commonSchemas.deviceId(), }), handler: async (args: any, spotifyService: SpotifyService) => { const { token, contextUri, trackUris, deviceId } = args; return await spotifyService.resumePlayback( token, contextUri, trackUris, deviceId ); }, },
- src/mcp/tools/index.ts:22-36 (registration)Aggregation and registration of playbackTools (containing resume_player) into the central allTools registry used by ToolRegistrar for MCP tool exposure.export const allTools: ToolsRegistry = { ...albumTools, ...artistTools, ...trackTools, ...playlistTools, ...playbackTools, ...userTools, ...searchTools, };
- src/spotify.ts:665-672 (helper)Supporting method in SpotifyService.resumePlayback that forwards to playMusic, implementing the resume logic via Spotify API.async resumePlayback( token: string, contextUri: string | null = null, trackUris: string | string[] | null = null, deviceId: string | null = null ): Promise<void> { return await this.playMusic(token, trackUris, contextUri, deviceId); }