Upper endoscopy surgery, also known as esophagogastroduodenoscopy (EGD), is a minimally invasive procedure used to examine the upper digestive tract, including the esophagus, stomach, and duodenum. It involves inserting a thin, flexible tube with a camera through the mouth to diagnose or treat conditions such as ulcers, inflammation, or blockages, cancer.