Upper GI endoscopy is a medical procedure that uses a scope to look inside the upper part of the digestive system. It also allows your doctor to diagnose and, in some cases, treat problems. This procedure is also known as EGD.