Skip to main content
Glama

resumePlayback

Resume Spotify playback on the active device using the specified Spotify device ID. Simplifies controlling music playback via the Spotify MCP Server.

Instructions

Resume Spotify playback on the active device

Input Schema

NameRequiredDescriptionDefault
deviceIdNoThe Spotify device ID to resume playback on

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "deviceId": { "description": "The Spotify device ID to resume playback on", "type": "string" } }, "type": "object" }

Implementation Reference

  • The asynchronous handler function for the 'resumePlayback' tool. It destructures the optional deviceId from input args, wraps the Spotify API call to startResumePlayback in handleSpotifyRequest, and returns a success text message.
    handler: async (args, _extra: SpotifyHandlerExtra) => { const { deviceId } = args; await handleSpotifyRequest(async (spotifyApi) => { await spotifyApi.player.startResumePlayback(deviceId || ''); }); return { content: [ { type: 'text', text: 'Playback resumed', }, ], }; },
  • Zod input schema for the 'resumePlayback' tool, defining an optional deviceId parameter with description.
    schema: { deviceId: z .string() .optional() .describe('The Spotify device ID to resume playback on'), },
  • src/play.ts:362-371 (registration)
    Registration of the 'resumePlayback' tool within the exported playTools array, which likely registers the MCP tools.
    export const playTools = [ playMusic, pausePlayback, skipToNext, skipToPrevious, createPlaylist, addTracksToPlaylist, resumePlayback, addToQueue, ];

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