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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pause_playback"
}
}Input 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()