Skip to main content
Glama

get_playback_state

Retrieve current playback details from Spotify, including track information and player status.

Instructions

Get current playback information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:66-69 (handler)
    The MCP tool handler function for 'get_playback_state', decorated with @mcp.tool() for registration and execution. It delegates to SpotifyClient.get_current_playback().
    @mcp.tool()
    async def get_playback_state() -> str:
        """Get current playback information"""
        return await client.get_current_playback()
  • Supporting method in SpotifyClient class that implements the core logic by calling spotipy's current_playback() to retrieve the playback state.
    async def get_current_playback(self) -> str:
        """
        Get information about current playback state.
        """
        try:
            playback = self.sp.current_playback()
            if not playback:
                return "No active playback session."
            return playback
        except Exception as e:
            return f"Error getting playback state: {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 the full burden of behavioral disclosure. 'Get current playback information' implies a read-only operation, but it doesn't specify details like whether it requires authentication, what format the information is returned in, or if there are any rate limits. This leaves significant gaps in understanding the tool's behavior.

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 action and resource, making it highly efficient and easy to parse.

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 low complexity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on behavior, usage context, or output format. For a simple read operation, this might suffice, but it doesn't provide a complete picture for an AI agent to use it effectively without additional context.

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 input schema has 0 parameters with 100% coverage, so no parameter information is needed. The description doesn't mention parameters, which is appropriate here. It gets a baseline score of 4 because the schema fully documents the lack of parameters, and the description doesn't need to compensate.

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

Purpose3/5

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

The description 'Get current playback information' clearly states the verb ('Get') and resource ('current playback information'), making the purpose understandable. However, it's somewhat vague about what specific information is retrieved, and it doesn't distinguish this tool from potential siblings like 'get_current_track' or 'get_queue', which might overlap in functionality.

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_current_track' and 'get_queue' that might retrieve similar or related playback data, there's no indication of what makes this tool unique or when it should be preferred over others.

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