On the Lagrangian and Hamiltonian formulation of a scalar free field theory at null infinity