San Francisco surrendered a fifth-round pick and a 2021 third-round pick for Williams.