We develop a theory for the dynamics of an Andreev bound state hosted by a weak link of finite length for which charging effects are important. We derive the linear response of both the current through the link and charge accumulated in it with respect to the phase and gate voltage biases. The resulting matrix encapsulates the spectroscopic properties of a weak link embedded in a microwave resonator. In the low-frequency limit, we obtain the response functions analytically using an effective low-energy Hamiltonian, which we derive. This Hamiltonian minimally accounts for Coulomb interaction and is suitable for a phenomenological description of a weak link having a finite length.