Supposingly, I see a friend with some object in his hands and I want to ask him the following:
What is the thing that you have got?
So, I actually want to combine two ideas - 1) You have something in your hands and 2) What is this? (not just the second one) and make it quite short and grammatical at the same time.
Is the question What is it you have got? grammatically correct?
If I were a native speaker of English, I would never shut up. :-)
More natural would be "What have you got there?" or "What are you holding?"
Remember - correct capitalisation, punctuation and spacing make posts much easier to read.