Beyond diagnosis, upper endoscopy can also play a role in the treatment of gastrointestinal cancers. It can be used to perform therapeutic interventions, such as removing polyps, treating bleeding lesions, or placing stents to relieve obstructions. These procedures can be crucial in the management of cancer symptoms and complications.