We present the results from simultaneous radio (Very Large Array) and X-ray (Rossi-X-ray Timing Explorer) observations of the Z-type neutron star X-ray binary GX~17+2. The aim is to assess the coupling between X-ray and radio properties throughout its three rapidly variable X-ray states and during the time-resolved transitions. These observations allow us, for the first time, to investigate quantitatively the possible relations between the radio emission and the presence of the hard X-ray tails and the X-ray state of the source. The observations show: 1) a coupling between the radio jet emission and the X-ray state of the source, i.e. the position in the X-ray hardness-intensity diagram (HID); 2) a coupling between the presence of a hard X-ray tail and the position in the HID, qualitatively similar to that found for the radio emission; 3) an indication for a quantitative positive correlation between the radio flux density and the X-ray flux in the hard-tail power law component; 4) evidence for the formation of a radio jet associated with the Flaring Branch-to-Normal Branch X-ray state transition; 5) that the radio flux density of the newly-formed jet stabilizes when also the normal-branch oscillation (NBO) in the X-ray power spectrum stabilizes its characteristic frequency, suggesting a possible relation between X-ray variability associated to the NBO and the jet formation. We discuss our results in the context of jet models.