Is ok to take Xanax while you have your kids in your care?

My doctor prescribed me Xanax to help with anxiety along with a low dose anti-depressant. I'm a little wary about taking the Xanax though because it can be habit forming and I'm not really a pill taker to begin with. But I have been so anxious today that I feel like I'm going to jump out of my skin! I normally use meditation to relieve anxiety, but for some reason it's really high today.

Is it ok to take the medication while my kids are in my care? Is it something that will impair my ability to care for my kids? I've never really used any kind of anti-anxiety medicine before. I read the side effects, but still.. I'm a little cautious to resort to taking it.