Endoscopy of the gastrointestinal tract allows the non-surgical visualization of lesions, biopsy of intestinal tissues, and removal of foreign objects.