Magnesium citrate is prescribed to prevent the recurrence of calcium oxalate kidney stones and relieve constipation as it is an osmotic laxative. used in cases of oxaluria. and Mild laxative to relieve constipation.