This is a situation that has many possibilities:
1) something does not go to your liking.
2) something was out of the ordinary, or in question.
3) something involving a snake (which could mean either a good friend or a thief/liar; see snake
4) the possibilities for this term are quite vast.
5) another way to use this would be to transform tomfoolery
into another form. e.g. - What is this Tom Snakery?