remove_album_from_favorites
Remove an album from your TIDAL favorites list by providing the album ID to manage your saved music collection.
Instructions
Remove an album from user's favorites.
Args: album_id: ID of the album to remove from favorites
Returns: Success status and confirmation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| album_id | Yes |
Implementation Reference
- src/tidal_mcp/server.py:1255-1285 (handler)The @mcp.tool()-decorated handler function that executes the logic to remove an album from the user's TIDAL favorites using the tidalapi session.@mcp.tool() async def remove_album_from_favorites(album_id: str) -> RemoveFromFavoritesResult: """ Remove an album from user's favorites. Args: album_id: ID of the album to remove from favorites Returns: Success status and confirmation """ if not await ensure_authenticated(): raise ToolError("Not authenticated. Please run the 'login' tool first.") try: album_id_int = int(album_id) await anyio.to_thread.run_sync( session.user.favorites.remove_album, album_id_int ) return RemoveFromFavoritesResult( status="success", item_id=album_id, item_type="album", message=f"Album {album_id} removed from favorites", ) except ValueError: raise ToolError(f"Invalid album ID format: {album_id}") except Exception as e: raise ToolError(f"Failed to remove album from favorites: {str(e)}")
- src/tidal_mcp/models.py:185-192 (schema)Pydantic BaseModel defining the structured output schema for remove_album_from_favorites and similar tools, including status, item_id, item_type, and message.class RemoveFromFavoritesResult(BaseModel): """Result of removing an item from favorites.""" status: str = Field(description="Operation status (success/error)") item_id: str = Field(description="ID of the item removed from favorites") item_type: str = Field(description="Type of item (track/album/artist)") message: str = Field(description="Status message")
- src/tidal_mcp/server.py:1255-1285 (registration)The @mcp.tool() decorator registers this function as an MCP tool named 'remove_album_from_favorites' with FastMCP.@mcp.tool() async def remove_album_from_favorites(album_id: str) -> RemoveFromFavoritesResult: """ Remove an album from user's favorites. Args: album_id: ID of the album to remove from favorites Returns: Success status and confirmation """ if not await ensure_authenticated(): raise ToolError("Not authenticated. Please run the 'login' tool first.") try: album_id_int = int(album_id) await anyio.to_thread.run_sync( session.user.favorites.remove_album, album_id_int ) return RemoveFromFavoritesResult( status="success", item_id=album_id, item_type="album", message=f"Album {album_id} removed from favorites", ) except ValueError: raise ToolError(f"Invalid album ID format: {album_id}") except Exception as e: raise ToolError(f"Failed to remove album from favorites: {str(e)}")