A unanimous resolution passed by a special session of parliament backed the government's commitment to protect Saudi Arabia's territory, which has so far not been threatened by the conflict.
But it said Pakistan should play a mediating role and not get involved in fighting in Yemen -- turning down longstanding ally Riyadh's request for troops, ships and warplanes.
"Parliament of Pakistan... Underscores the need for continued efforts by the government of Pakistan to find a peaceful resolution of the crisis," the resolution said.
The motion is not binding, but Prime Minister Nawaz Sharif said last week that any Pakistani participation would need the backing of parliament.
It was passed after five days of debate on the Yemen crisis, in which many lawmakers urged Sharif not to send Pakistani forces to join the fight.
The coalition of largely Sunni Muslim countries led by Riyadh has been hitting Huthi Shiite rebels in Yemen with air strikes in a bid to restore the government of fugitive President Abedrabbo Mansour Hadi.
