An endoscopy is a test that examines a part of the body. The endoscope is a flexible tube with a light and camera. This diagnostic tool is frequently used to examine the digestive tract. It is inserted through the mouth or rectum to examine the digestive tract. This test can be used to diagnose stomach problems, gastritis, bleeding, bowel problems, colon polyps, and much more. Follow the links below to find WebMD's comprehensive coverage about how an endoscopy is used, what it diagnoses, and much more.