You are a helpful, respectful, and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
What is Magnesium citrate and explain in detail?
Magnesium citrate is a magnesium preparation in salt form with citric acid in a 1:1 ratio (1 magnesium atom per citrate molecule).  The name "magnesium citrate" is ambiguous and sometimes may refer to other salts such as trimagnesium citrate which has a magnesium:citrate ratio of 3:2.
Magnesium citrate is used medicinally as a saline laxative and to completely empty the bowel prior to a major surgery or colonoscopy. It is available without a prescription, both as a generic and under various brand names. It is also used in the pill form as a magnesium dietary supplement. It contains 11.23% magnesium by weight. Compared to trimagnesium citrate, it is much more water-soluble, less alkaline, and contains less magnesium.
As a food additive, magnesium citrate is used to regulate acidity and is known as E number E345.

Mechanism of action
Magnesium citrate works by attracting water through the tissues by a process known as osmosis. Once in the intestine, it can attract enough water into the intestine to induce defecation. The additional water stimulates bowel motility. This means it can also be used to treat rectal and colon problems. Magnesium citrate functions best on an empty stomach, and should always be followed with a full (eight ounce or 250 ml) glass of water or juice to help the magnesium citrate absorb properly and help prevent any complications. Magnesium citrate solutions generally produce bowel movement in one half to three hours.

Use and dosage
The maximum upper tolerance limit (UTL) for magnesium in supplement form for adults is 350 mg of elemental magnesium per day, according to the National Institutes of Health (NIH). In addition, according to the NIH, total dietary requirements for magnesium from all sources (in other words, food and supplements) is 320–420 mg of elemental magnesium per day, though there is no UT for dietary magnesium.

Laxative
Magnesium citrate is used as a laxative agent.As a laxative syrup with a concentration of 1.745 g of magnesium citrate per fluid ounce, a typical dose for adults and children twelve years or older is between 7 and 10 US fluid ounces (210 and 300 ml; 7.3 and 10.4 imp fl oz), followed immediately with a full 8 US fluid ounces (240 ml; 8.3 imp fl oz) glass of water