Usage in nature
Yes, the slug uses the glue to secure itself to whatever surface it may be on. One of the sources had a wonderful text-image of a bird trying to pull the slug off a wet leaf but finding itself unable to do so no matter how hard it grabs and pulls. I couldn't figure out how to use it without either plagiarizing or providing information not in the source.
One of the sources did paint a nice word picture of that. Another source (well, two but I think one was getting it from the other) painted a nice word picture of a predator getting its jaw glued shut. When the sources are inconsistent like that, none of it can be treated as "common knowledge"; it's all hearsay. My guess would be that both happen, but of course we don't get to guess and also don't need to.