Based on what?
(Let's please go beyond the hacker news slapback and cite a real source)
It's not actually legal in the UK, and even the person who did it admits it is "uncharted territory".
The parliament's own publications state what I told you. A simple google about what the UK parliament has the power to compel will give you these results.
They can summon people and papers in the jurisdiction of the UK.
So it would totally be legal to summon them and do what you want if the person was a UK citizen, or compel the papers if they were in the UK.
However, the person in question is not. They were certainly under the jurisdiction of the UK, so you theoretically could compel them to a hearing (though even this is arguable if you read parliament's own publications. They've addressed it before, and the answer is "probably not")
Also, since they are a US citizen traveling abroad, international treaties/law between US and UK would have given him the right to refuse and be compelled through legal process.
In any case, the compulsion was to produce the papers, and there is simply no viable argument i've seen that the papers were under the jurisdiction of the UK.
So if you believe there is some power that makes it magically legal, please, by all means, cite it!
All articles, advice, etc, i can find suggests precisely the opposite - they knew this was not okay to do.