It generally works. A crab would evolve pointy claws for tearing flesh, rounded ones for scraping algaes. I'm sure there are exceptions, but it's a very quick and easy way to make an educated guess. There are so many species of crabs that it isn't always possible to identify one and, if you could, there may be little research into what it actually does for a living