pause_playback
Pause Spotify playback to temporarily stop music or podcasts. This tool halts audio streaming when you need to focus or take a break.
Instructions
FastMCP tool to pause playback on spotify.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- spotify.py:79-87 (handler)Core implementation of pause_playback in SpotifyClient class, calling spotipy.Spotify.pause_playback() to pause Spotify playback.async def pause_playback(self) -> str: """ Pause playback on the specified device. """ try: self.sp.pause_playback() return "Playback paused successfully" except Exception as e: return f"Error pausing playback: {str(e)}"
- main.py:24-29 (registration)FastMCP tool registration decorator and wrapper function for pause_playback, delegating to SpotifyClient instance.@mcp.tool() async def pause_playback() -> str: """ FastMCP tool to pause playback on spotify. """ return await client.pause_playback()