A procedure that helps your doctor diagnose and treat problems in your upper gastrointestinal (GI) tract, which includes your esophagus, stomach, and beginning of your small intestine. Your doctor will use an endoscope inserted through your mouth to look at these areas, and take tissue samples, remove anything stuck in the upper GI track, or do procedures like endoscope surgery if necessary.