I have read two books by a great American researcher and nutritionist: Adelle Davis. She thoroughly explains why kidney stones are formed, that kidney stones can be prevented and that kidney stones can be dissolved.
Magnesium is essential because it acidifies the urine and in acid urine stones cannot be formed.
Vit B6 prevents the formation of oxalic acid kidney stones and calcium has to be present in the diet because if calcium is lacking in the diet, the body will withdraw it from the bones and form the stones just the same.
As magnesium interacts with calcium, if both minerals are taken in the right proportions (300 mgs of magnesium per 1 gram of calcium) kidney stones are not formed and/or can be dissolved. This is what has kept me free from stones for the last 20 years. As soon as I FEEL there's grit in my kidney, I increase my intake of magnesium and problem is gone in 24 hours.
Kidney Stones: Take 2 or 3 magnesium tablets 1 B6 tablet every day and drink more water. My husband had them often, since he started this, he hasn't had any in years.