Fish communities associated with coral reefs worldwide are threatened by overexploitation and other human impacts such as bleaching events that cause habitat degradation. We assessed the fish community on coral reefs on the Caribbean coast of Panama, as well as those associated with mangrove and seagrass habitats, to explore the influences of habitat cover, connectivity and environmental characteristics in sustaining biomass, richness and trophic structure in a degraded tropical ecosystem. Overall, 94 % of all fishes across all habitat types were of small body size (≤11 cm), with communities dominated by fishes that usually live in habitats of low complexity, such as Pomacentridae (damselfishes) and Gobiidae (gobies). Moreover, total fish biomass was very low, small fishes from low trophic levels were over-represented, and top predators were under-represented relative to other Caribbean reefs. For example, herbivorous/omnivorous/detrivorous fishes (trophic level 2-2.7) comprised 37 % of total fish biomass, with the diminutive parrotfish Scarus iseri comprising 72 % of the parrotfish biomass. However, the abundance of sponges and proximity of mangroves were found to be important positive drivers of reef fish richness, biomass and trophic structure on a given reef, presumably by promoting functional processes of ecosystems. The masked goby (Coryphopterus personata) was a strong indicator of reef degradation, apparently benefiting from the reduced density of large predators on local reefs. The damselfish Abudefduf saxatilis was more common on reefs with high sponge cover, and also to proximity to mangroves. Our study suggests that a diverse fish community can persist on degraded coral reefs, and that the availability of habitat forming organisms other than corals, including sponges and mangroves, and their arrangement on the landscape, is critical to the maintenance of functional processes in these ecosystems.