Upper GI endoscopy (EGD) is a surgical procedure that involves the insertion of one long, flexible camera into the mouth to examine the gastrointestinal tract. This camera allows doctors to view the inside of the esophagus and throat. This procedure involves sedation and allows doctors to diagnose and treat problems that may be present in the upper GI tract.