BackgroundChemical defences are widespread in animals, but how their production is adjusted to ecological conditions is poorly known. Optimal defence theory predicts that inducible defences are favoured over constitutive defences when toxin production is costly and the need for it varies across environments. However, if some environmental changes occur predictably (e.g. coupled to transitions during ontogeny), whereas others are unpredictable (e.g. predation, food availability), changes in defences may have constitutive as well as plastic elements. To investigate this phenomenon, we raised common toad (Bufo bufo) tadpoles with ad libitum or limited food and in the presence or absence of chemical cues on predation risk, and measured their toxin content on 5 occasions during early ontogeny.ResultsThe number of compounds showed limited variation with age in tadpoles and was unaffected by food limitation and predator cues. The total amount of bufadienolides first increased and later decreased during development, and it was elevated in young and mid-aged tadpoles with limited food availability compared to their ad libitum fed conspecifics, whereas it did not change in response to cues on predation risk. We provide the first evidence for the active synthesis of defensive toxin compounds this early during ontogeny in amphibians. Furthermore, the observation of increased quantities of bufadienolides in food-restricted tadpoles is the first experimental demonstration of resource-dependent induction of elevated de novo toxin production, suggesting a role for bufadienolides in allelopathy.ConclusionsOur study shows that the evolution of phenotypic plasticity in chemical defences may depend on the ecological context (i.e. predation vs. competition). Our results furthermore suggest that the age-dependent changes in the diversity of toxin compounds in developing toads may be fixed (i.e., constitutive), timed for the developmental stages in which they are most reliant on their chemical arsenal, whereas inducible plasticity may prevail in the amount of synthesized compounds.Electronic supplementary materialThe online version of this article (doi:10.1186/s12862-017-0956-5) contains supplementary material, which is available to authorized users.