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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the return values (track name, artist, album) but doesn't cover critical behaviors: what happens if iTunes isn't running, if no song is playing, error handling, or whether this is a read-only operation. The description adds some context but leaves significant gaps for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded: two sentences that directly state the purpose and return values without any fluff. Every sentence earns its place by providing essential information. It's appropriately sized for a simple tool with no parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, output schema exists), the description is adequate but has gaps. It explains the return values, but with no annotations, it should address behavioral aspects like error conditions or dependencies (e.g., iTunes must be active). The output schema likely covers return structure, so the description doesn't need to detail that, but it could better prepare the agent for real-world usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100% (since there are no parameters to describe). The description doesn't need to add parameter semantics, so it meets the baseline of 4 for tools with no parameters. It appropriately focuses on the tool's function rather than inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get information about the currently playing track.' It specifies the verb ('Get information') and resource ('currently playing track'), distinguishing it from siblings like itunes_play or itunes_pause. However, it doesn't explicitly differentiate from itunes_all_songs or itunes_library, which also retrieve track information but with different scopes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., iTunes must be running and playing a song), exclusions (e.g., what happens if nothing is playing), or comparisons to siblings like itunes_search or itunes_play_song. Usage is implied by the name but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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