Skip to main content
Glama

resumePlayback

Resume Spotify music playback on your active device to continue listening where you left off.

Instructions

Resume Spotify playback on the active device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdNoThe Spotify device ID to resume playback on

Implementation Reference

  • The handler function for the 'resumePlayback' tool. It destructures the optional deviceId from args, calls handleSpotifyRequest to invoke spotifyApi.player.startResumePlayback on the specified or default device, and returns a success 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' string parameter.
    schema: { deviceId: z .string() .optional() .describe('The Spotify device ID to resume playback on'), },
  • src/index.ts:12-14 (registration)
    Registers the 'resumePlayback' tool (included in playTools) with the MCP server by calling server.tool() for each tool in the spread array.
    [...readTools, ...playTools, ...albumTools].forEach((tool) => { server.tool(tool.name, tool.description, tool.schema, tool.handler); });
  • src/play.ts:369-369 (registration)
    The 'resumePlayback' tool object is added to the exported playTools array, which is later imported and registered in index.ts.
    resumePlayback,

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/makesh-kumar/spotify-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server