Upper GI endoscopy is a procedure that lets doctors look inside the upper part of the digestive system, which includes the esophagus, stomach, and the first part of the small intestine (duodenum). A thin, flexible tube with a camera, called an endoscope, is gently passed through the mouth and down into these areas so the doctor can check for problems and, if needed, perform treatments during the same procedure.