Thanks for posting your query.
With the available described details, there appears to excessive production of mucus which is passing along with stools.
Do you have some sort of stress?
Excessive stress may cause production of mucus and could be associated with IBS.
You should consult with internal medicine specialist/ gastroenterologist and should go for thorough check up.
You should also go for complete blood count
imaging, and serum electrolytes, blood sugar, serum amylase and thyroid profile.
You should also go for colonoscopy
for better clarification.
Meanwhile, you should take probiotics, rifaximin and low dose selective serotonin reuptake inhibitors (SSRIs).
You should also consult with psychiatrist
Avoid oily and spicy food, tomatoes, citrus fruits, excessive tea & coffee, chocolates.
Take soft diet
along with yogurt.
Dr. Mayank Bhargava