get_queue
Retrieve the current list of tracks waiting to play in Spotify, showing upcoming songs in your playback queue.
Instructions
Get the current queue of tracks
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": "get_queue"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:123-127 (handler)MCP FastMCP tool handler for 'get_queue'. This is the entrypoint registered with the MCP server, delegating to the SpotifyClient instance.
@mcp.tool() async def get_queue() -> str: """Get the current queue of tracks""" return await client.get_queue() - spotify.py:222-232 (helper)Core implementation of get_queue in SpotifyClient class, calling the Spotipy API's queue() method to fetch the current playback queue.
async def get_queue(self) -> dict: """ Get the current user's queue. Returns information about the queue including currently playing track and next tracks. """ try: results = self.sp.queue() return results except Exception as e: return f"Error getting queue: {str(e)}"