Skip to main content
Glama

get_current_track

Retrieve details about the currently playing Spotify track, including title, artist, and album information.

Instructions

Get information about the currently playing track

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:149-152 (registration)
    Registration of the MCP tool 'get_current_track' using the @mcp.tool() decorator. This function serves as the tool handler, delegating to the SpotifyClient instance.
    @mcp.tool()
    async def get_current_track() -> str:
        """Get information about the currently playing track"""
        return await client.get_current_track()
  • main.py:149-152 (handler)
    The handler function for the 'get_current_track' tool, which calls the underlying SpotifyClient method.
    @mcp.tool()
    async def get_current_track() -> str:
        """Get information about the currently playing track"""
        return await client.get_current_track()
  • Core implementation in SpotifyClient class that fetches the current track using spotipy's current_user_playing_track() method.
    async def get_current_track(self) -> dict:
        """
        Get detailed information about the currently playing track.
        Returns None if no track is currently playing.
        """
        try:
            result = self.sp.current_user_playing_track()
            if not result:
                return "No track currently playing"
            return result
        except Exception as e:
            return f"Error getting current track: {str(e)}"
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states what the tool does but doesn't mention whether it requires authentication, returns structured data, handles errors if nothing is playing, or has rate limits. For a read operation with zero annotation coverage, this is insufficient.

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 a single, clear sentence with no wasted words. It's front-loaded with the core purpose and appropriately sized for a simple tool, making it easy for an agent to parse quickly without extraneous detail.

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

Completeness2/5

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

Given the complexity of a media playback tool with no annotations and no output schema, the description is incomplete. It doesn't explain what information is returned (e.g., track name, artist, duration), error conditions, or dependencies like requiring active playback, leaving significant gaps for the agent.

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%, so there's no need for parameter details in the description. The description appropriately doesn't discuss parameters, earning a baseline high score since it doesn't add unnecessary information beyond what the schema already covers perfectly.

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 verb 'Get' and the resource 'information about the currently playing track', making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_playback_state' or 'get_queue' which might also provide related playback information, preventing a perfect score.

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. With siblings like 'get_playback_state' that might include track info, there's no indication of whether this tool is more specific or when it's preferred, leaving the agent to guess based on tool names alone.

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/ashwanth1109/mcp-spotify'

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