Hello, my name is Dr.Dorina Gurabardhi. I understand your concern.
There are many reasons that cause mucus on stool. It can be :
Crohn’s disease,cystic fibrosis
ulcerative colitis,
irritable bowel syndrome,intestinal infection,
parasitic infection,malabsorption issues etc
To diagnose is necessary to do some examinations such as blood test,stool culture,urinalysis,colonoscopy,endoscopy.
Some advices that I can give to you are :
-increase your fluid intake
-eat foods rich in probiotics or supplements that contain probiotics, such as
Bifidobacterium or Lactobacillus
-consume anti-inflammatory foods, such as low-acid and nonspicy foods
-get a healthy balance of fiber, carbohydrates, and fat in your diet
If it continues see a gastrologyst. Hope my answer was helpful, if you have any other questions I'll be glad to help, thanks!