Skip to main content
Glama

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
NameRequiredDescriptionDefault
deviceIdNoThe Spotify device ID to resume playback on

Implementation Reference

  • 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', }, ], }; }, };
  • 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); });

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