Gastrointestinal (GI) endoscopy is a minimally invasive procedure that allows a healthcare provider to examine the inside of the gastrointestinal tract using an endoscope. An endoscope is a flexible tube with a light and camera on the end that provides a view of the GI tract on a monitor. GI endoscopy can help diagnose and treat various conditions affecting the upper and lower GI tract.