The Moorish idol is an omnivorous reef fish. Its diet includes plankton, algae, small invertebrates such as crustaceans and mollusks, coral mucus and polyps, and detritus. By grazing on algae and plankton, Moorish idols help maintain the health of coral reef ecosystems.