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