Hours after the Philadelphia Phillies defeated state-rival Tampa Bay to win the World Series , the Marlins traded Jacobs to the Kansas City Royals for relief pitcher Leo Nunez of the Dominican Republic .