Skip to main content
Glama

start_playback_track

Play a specific track on Spotify by providing its track URI. Use this tool to start music playback on your preferred device.

Instructions

Start playback of a specific track on Spotify
Args:
    track_uri: Spotify URI of the track (e.g. 'spotify:track:1234...')
    device_id: Optional device to play on

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_uriYes
device_idNo

Implementation Reference

  • main.py:101-110 (handler)
    The FastMCP tool handler function for 'start_playback_track', decorated with @mcp.tool() for registration, which calls the SpotifyClient method.
    @mcp.tool()
    async def start_playback_track(track_uri: str, device_id: str = None) -> str:
        """
        Start playback of a specific track on Spotify
        Args:
            track_uri: Spotify URI of the track (e.g. 'spotify:track:1234...')
            device_id: Optional device to play on
        """
        return await client.start_playback_track(track_uri, device_id)
  • SpotifyClient helper method that implements the core logic using spotipy.Spotify.start_playback with the provided track URI.
    async def start_playback_track(
        self, track_uri: str, device_id: Optional[str] = None
    ) -> str:
        """
        Start playback of a specific track.
        - track_uri: Spotify URI of the track to play
        - device_id: Optional device to play on
        """
        try:
            self.sp.start_playback(device_id=device_id, uris=[track_uri])
            return "Started playing track successfully"
        except Exception as e:
            return f"Error starting track 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 but offers minimal behavioral insight. It mentions starting playback but doesn't disclose whether this interrupts current playback, requires authentication, has rate limits, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves significant gaps.

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 sized and front-loaded with the core purpose in the first sentence. The parameter explanations are brief but clear, with no redundant information. It could be slightly more structured but efficiently conveys key points.

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 2 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks crucial context: error conditions, return values, interaction with other playback tools, and behavioral nuances like whether it queues or immediately plays the track.

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?

Schema description coverage is 0%, but the description adds value by explaining 'track_uri' as a Spotify URI with an example format and noting 'device_id' is optional. However, it doesn't fully compensate for the coverage gap—missing details like URI validation, device_id format, or default behavior when device_id is omitted.

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 action ('Start playback') and resource ('specific track on Spotify'), making the purpose immediately understandable. It distinguishes from siblings like 'start_playback' or 'start_playlist_playback' by specifying it's for individual tracks, though it doesn't explicitly contrast with these alternatives.

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?

No guidance is provided on when to use this tool versus alternatives like 'start_playback' or 'start_playlist_playback'. The description only states what it does without context about prerequisites (e.g., active Spotify session), when it's appropriate, or what happens if playback is already active.

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