Where there was water...? Right?
I don't think about this little bot very often, but I did want to dig up bits on how it could test for these compounds. I thought perhaps it was programmed to dig up samples, burn them, and then identify them by how they processed (which I literally only thought of due to that Numa gluten meter I know absolutely nothing about chemistry). But I found the starts of what allows it to analyze things (I say the start because even this page is pretty thin). But it looks like it's through a variety of powerful cameras. At least for the mineral based stuff.