The endoscopy is performed using an endoscope. This is a flexible tube that is about the size of a finger. The endoscope allows the endoscopist to see the inner lining of the upper gastrointestinal (GI) tract. The endoscopist may also perform specific treatments (such as dilation, removal of polyps, treatment of bleeding), depending upon what is found during the examination.