Skip to main content
Glama

start_playlist_playback

Play a Spotify playlist by providing its ID, optionally specifying a device for playback.

Instructions

Start playback of a specific playlist
Args:
    playlist_id: Spotify playlist ID
    device_id: Optional device to play on

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
playlist_idYes
device_idNo

Implementation Reference

  • main.py:155-166 (handler)
    The main handler function for the MCP tool 'start_playlist_playback'. It is registered via the @mcp.tool() decorator and handles starting playback of a specified Spotify playlist by constructing the context URI and calling the SpotifyClient helper method.
    @mcp.tool()
    async def start_playlist_playback(playlist_id: str, device_id: str = None) -> str:
        """
        Start playback of a specific playlist
        Args:
            playlist_id: Spotify playlist ID
            device_id: Optional device to play on
        """
        return await client.start_context_playback(
            f"spotify:playlist:{playlist_id}", device_id
        )
  • Helper method in the SpotifyClient class that performs the actual Spotify API call to start playback of a context URI (such as a playlist), used by the MCP tool handler.
    async def start_context_playback(
        self, context_uri: str, device_id: Optional[str] = None
    ) -> str:
        """
        Start playback of a context (playlist, album, artist)
        - context_uri: Spotify URI (e.g. 'spotify:playlist:37i9dQ...')
        - device_id: Optional device to play on
        """
        try:
            self.sp.start_playback(device_id=device_id, context_uri=context_uri)
            return "Started playing context successfully"
        except Exception as e:
            return f"Error starting context playback: {str(e)}"
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Start playback' implies a write operation that changes system state, it doesn't mention authentication requirements, rate limits, error conditions, or what happens if playback is already active. This leaves significant behavioral gaps for a mutation tool.

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

Conciseness4/5

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

The description is appropriately brief with a clear purpose statement followed by parameter explanations. The two-sentence structure is efficient, though the parameter section could be more integrated rather than appearing as a separate 'Args:' block. Overall, it's well-structured without unnecessary verbiage.

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?

For a mutation tool with no annotations, no output schema, and 0% schema description coverage, the description is insufficiently complete. It doesn't explain what happens on success (e.g., playback starts, returns confirmation), error conditions, or how it interacts with other playback tools. The minimal parameter documentation also leaves gaps in understanding required inputs.

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

Parameters3/5

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

The description lists both parameters with brief explanations, but schema description coverage is 0%, so the schema provides no additional documentation. The parameter explanations are minimal ('Spotify playlist ID', 'Optional device to play on') and don't specify format requirements or constraints. This provides basic semantics but lacks the detail needed for confident parameter usage.

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 ('Start playback') and resource ('of a specific playlist'), making the purpose immediately understandable. However, it doesn't distinguish this tool from the similar 'start_playback' and 'start_playback_track' siblings, which would require explicit differentiation to achieve 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 like 'start_playback' or 'start_playback_track'. It also doesn't mention prerequisites (e.g., whether playback must be paused first) or exclusions, leaving the agent to infer usage context from 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