An endoscopy is a procedure used to find the cause of the narrowing of your esophagus. Healthcare providers use an endoscope to examine your esophagus. An endoscope is a bendable tube with a light and camera on the end.