Endoscopy A procedure whereby a flexible fiber-optic tube is inserted into the esophagus, stomach or small intestine through the mouth (upper endoscopy) or into the large intestine through the anus (lower endoscopy) to look for abnormalities.