Skip to main content
Glama

itunes_current_song

Retrieve the currently playing track details including song name, artist, and album from Apple Music on macOS.

Instructions

Get information about the currently playing track. Returns the track name, artist, and album.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'itunes_current_song' tool. It uses AppleScript via run_applescript to query the Music app for the currently playing track's name, artist, and album.
    @mcp.tool() def itunes_current_song() -> str: """ Get information about the currently playing track. Returns the track name, artist, and album. """ script = """ tell application "Music" if player state is playing then set currentTrack to current track return "Now playing: " & (name of currentTrack) & " by " & (artist of currentTrack) & " from " & (album of currentTrack) else return "No track is currently playing" end if end tell """ return run_applescript(script)

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/kennethreitz/mcp-applemusic'

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