resumePlayback
Resume Spotify music playback on your active device. Use this tool to restart paused songs or playlists.
Instructions
Resume Spotify playback on the active device
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deviceId | No | The Spotify device ID to resume playback on |
Implementation Reference
- src/play.ts:283-299 (handler)The handler function for the 'resumePlayback' tool. It resumes Spotify playback on the specified device ID (or active device) using the Spotify API.handler: async (args, _extra: SpotifyHandlerExtra) => { const { deviceId } = args; await handleSpotifyRequest(async (spotifyApi) => { await spotifyApi.player.startResumePlayback(deviceId || ''); }); return { content: [ { type: 'text', text: 'Playback resumed', }, ], }; }, };
- src/play.ts:277-282 (schema)Input schema for the 'resumePlayback' tool, defining an optional 'deviceId' parameter.schema: { deviceId: z .string() .optional() .describe('The Spotify device ID to resume playback on'), },
- src/play.ts:506-506 (registration)The 'resumePlayback' tool is included in the 'playTools' array export.resumePlayback,
- src/index.ts:12-14 (registration)All tools from playTools (including 'resumePlayback') are registered to the MCP server.[...readTools, ...playTools, ...albumTools].forEach((tool) => { server.tool(tool.name, tool.description, tool.schema, tool.handler); });