Need advise

I am married in Apr2008 .During initial marriage days for 1.5 year My wife was not happy with our joint family and harassed me and my parents to stay separately.Due to recession in June 09, i lost my job and she went to her parents house without informing me.Their parents put a condition on me that if i stayed separately then only they will send their daughter. As I got a job in BLR and they agreed to send her to the BLR. She stayed for 3 months and got pregnant and went back to her parents house complaining health issues. Post giving birth to baby girl in Aug-10 at my inlaws house,she came to house in Jan 11. She started starting suffering mental health issues and was not able to perform daily task and take care of my daughter.My inlaws decided to take her back to their house in mumbai and started the medical treatment. I requested my inlaws to give the same in writing but they not give, as i was ready to do the treatment. I have been regularly sending money to them. My wife and motherin law have lately started abusing me and my parents that we have not taken care of them.She is putting false allegation against me and threatening that she will give notice through lawyer.Doctors have diagnosed that she is suffering from bipolar disorder which my inlaws did not knew. Doctor is not ready to give treatment certificate for her.With the help of mediators, it was proved that mistake was from my inlaws and wife only.My inlaws also did not send my wife and my 4year daughter to my house in last 2 years.Now inlaws are ready to send my wife to my house in next 6-8months putting some conditions on me that i will take care of her I am not able to decide that whether i should take her back to my house or not.I am also not confident that whether she can stay and manage daily task of herself. I want to know what legal document should i take in writing from them(wife & Inlaws)before she comes and start living in my house inorder to safeguard me and ensure same story does not repeat in future Please advise next action.