Endoscopy is a minimally invasive medical procedure that uses an endoscope to examine the interior of a body cavity or organ. An endoscope is a thin, flexible or rigid tube with a light source and lens that transmits images to a monitor. Modern endoscopes can be either fiber optic or video-based. A variety of tools can be passed through channels in the endoscope, including biopsy forceps, snares, and brushes. Endoscopy has evolved greatly since its origins in the early 19th century, and is now commonly used to diagnose and treat many gastrointestinal and respiratory conditions.