The 40 damage is done, but G-Tool prevents effects being done to the Pokemon that it's attached to, so it is not discarded.
And with no discard, you don't get to look at the hand.
Even if you did get to discard and look in the hand (say we were talking about Unown E instead), there are no Tools with that name in the deck. It's only a Tool when in play and when the Power has been used.