During an endoscopy, a thin, lighted tube called an endoscope is used to look into your stomach. The tube is passed through your mouth and esophagus to the stomach.