start_playback
Resume music playback on your active Spotify device. Use this tool to continue playing paused tracks or restart stopped playback.
Instructions
FastMCP tool to resume playback on the currently active Spotify device.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:16-22 (handler)MCP tool handler for 'start_playback'. This is the function executed when the tool is called. It delegates to the SpotifyClient instance.@mcp.tool() async def start_playback() -> str: """ FastMCP tool to resume playback on the currently active Spotify device. """ return await client.start_playback()
- spotify.py:69-78 (helper)Core implementation of start_playback in SpotifyClient class. Calls spotipy's start_playback() method to resume playback.async def start_playback(self) -> str: """ Resume playback on the currently active device. """ try: self.sp.start_playback() return "Playback started successfully" except Exception as e: return f"Error starting playback: {str(e)}"
- main.py:16-16 (registration)Registration of the 'start_playback' tool via FastMCP decorator.@mcp.tool()