Skip to main content
Glama

spotify_resume

Resume paused Spotify playback on your preferred device to continue listening to music or podcasts where you left off.

Instructions

Retoma a reprodução pausada

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idNoID do dispositivo (opcional)

Implementation Reference

  • The `resume` method in the `SpotifyTools` class implements the core logic for resuming Spotify playback by calling `spotifyApi.play()` after ensuring a valid access token.
    async resume(deviceId?: string) { try { await this.spotifyAuth.ensureValidToken(); const spotifyApi = this.spotifyAuth.getSpotifyApi(); const options = deviceId ? { device_id: deviceId } : {}; await spotifyApi.play(options); return { content: [ { type: 'text', text: '▶️ Reprodução retomada', }, ], }; } catch (error) { return { content: [ { type: 'text', text: `❌ Erro ao retomar: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } }
  • Input schema definition for the `spotify_resume` tool, specifying an optional `device_id` parameter.
    { name: 'spotify_resume', description: 'Retoma a reprodução pausada', inputSchema: { type: 'object', properties: { device_id: { type: 'string', description: 'ID do dispositivo (opcional)', }, }, }, },
  • src/index.ts:277-278 (registration)
    Registration of the `spotify_resume` tool in the MCP server's request handler switch statement, dispatching to the `SpotifyTools.resume` method.
    case 'spotify_resume': return await spotifyTools.resume(args.device_id);

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/fborello/MCPSpotify'

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