In the event that your dogs poop contains excessive mucus you should take him to the vet. Nevertheless the vet will want to see a stool sample so make sure you have that on hand.
In order to determine whether stress or dietary indiscretions are behind the problem the doctor will ask various questions. Veterinarians will run various tests to check for parasites and bacteria if there is no obvious cause.
Additionally the vet will try to determine whether it is mucus or fat that is coating the dogs stool. It is a completely different issue and it usually indicates that the dog is eating too much fat or his gallbladder or pancreas is malfunctioning.