Skip to main content
Glama

get_current_playing

Retrieve details about the track currently playing in Spotify, including song title, artist, and playback status.

Instructions

Get information about the currently playing track

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'get_current_playing' tool. It retrieves the currently playing track using SpotifyClient and returns formatted information about the track or indicates if nothing is playing.
    export async function getCurrentPlaying(client: SpotifyClient) { const track = await client.getCurrentlyPlaying(); if (!track) { return { success: true, playing: false, message: 'No track currently playing', }; } return { success: true, playing: track.isPlaying, track: { name: track.name, artist: track.artist, album: track.album, uri: track.uri, progressMs: track.progressMs, }, }; }
  • src/server.ts:300-309 (registration)
    Registration in the CallToolRequestSchema handler: dispatches the 'get_current_playing' tool call to the playbackTools.getCurrentPlaying function and formats the response.
    case 'get_current_playing': const currentResult = await playbackTools.getCurrentPlaying(client); return { content: [ { type: 'text', text: JSON.stringify(currentResult, null, 2), }, ], };
  • Tool schema definition in the ListToolsRequestSchema response, including name, description, and empty input schema (no parameters required).
    { name: 'get_current_playing', description: 'Get information about the currently playing track', inputSchema: { type: 'object', properties: {}, }, }, {

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/Ackberry/spotify_mcp'

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