Hi thanks for contacting health care magic.
If you have
food allergy to some foods then that foods should be avoided....
Gluten and
lactose intolerance also common one.
Check for first if stomach problem after gluten diet like wheat , rye etc....
If present serological test done for
celiac disease.
Second if lactose intolerance is there then dairy product restricted....
Now see if you taking high fatty foods then mucus in stool also can be there...
So avoid high fatty foods.
Stool get examined for routine microscopic examination.
If showing pus cell antibiotic given.
If show ameba egg
metronidazole given.
If hookworm or round worm then
albendazole taken...
Drink more water....
Fruits more....
Beet roots , kiwi , blue berries good for proper digestion.
With keeping this in mind consult gastroentetologist....
Take care.
Dr.Parth