Western European foreign ministers showed apparent willingness today to go along with stiff political and economic sanctions against the Soviet Union if it invades Poland, but they put off committing themselves to a specific set of responses.

Instead, the 15 foreign ministers of the North Atlantic Treaty Organization agreed to begin drawing up a list of possible retaliatory moves so could adopt sanctions quickly at an emergency meeting if the Soviets invade Poland.

The purpose of the talks among Secretary of State Edmund S. Muskie and the other foreign ministers was to prepare a unified NATO response to any hostile Soviet move against Poland.A year ago, NATO was caught unprepared by the Soviet invasion of Afghanistan, and its response was scattered and had a mixed effect.

This time, Muskie told reporters after the closed session, "All the ministers regard Soviet intervention in Poland as the gravest sort of development that would call for the most serious kind of response."

They were generally reluctant, nonetheless, to commit themselves firmly to any specific set of measures, citing the uncertainty of the situation and the concern that such action might unnecessarily provoke the Kremlin.

In a session restricted to only the 15 foreign ministers and each member nation's permanent Brussels representative, NATO officials reportedly exchanged ideas on what action to take should the Soviets move against Poland. The extra secrecy was planned long beforee the Polish crisis as a means of permitting freer discussion, but it conveniently fit into the need for a frank discussion today.

Muskie was said by well-informed sources to have presented a list of possible measures to punish the Soviet Union across a broad field of international activity in the event of an invasion.

Afterwards, Muskie told reporters that other ministers had expressed a "very strong, positive, unanimous" view of the Polish situation. He said it had been emphasized that the consequences of a Soviet invasion should be made clear in the hope of dissuading Moscow from launching one.

But if Soviet force were used, Muskie said, the NATO ministers agreed to convene again in Brussels in emergency session to consider "a range of options" that would be developed in the meantime.

According to European sources, among the possible sanctions under consideration by NATO are:

Reecalling ambassadors from Moscow and cutting back Western diplomatic staffs there.

Cancellation of some East-West conferences, including the Madrid conference to review the 1975 Helsinki agreement on European security, the Vienna talks on reducing troop concentrations in Europe and talks recently begun in Geneva on nuclear disarmament in Europe.

Rejecting new credits to Poland and the Soviet Union, which would effectively halt major economic and industrial projects including a planned 3,000-mile pipeline that would deliver natural gas from Siberia to Western Europe.

Further limitations on the sale by the West of high technology and strategic products to the Soviet Union.

U.S. officials said Muskie did not ask for solid commitments on these measures. The primary purpose of this round of consultations, they said, was to "lay the groundwork" for a clear, common Western response should it be needed.

This meant, according to one senior U.S. official, reaching "as clear an understanding as possible" of at least the directions Western sanctions would take.

The U.S. aim appeared to be to avoid both the lack of NATO preparedness that followed the invasion of Afghanistan and the irritation that developed within NATO when the United States and Europe failed to agree early on what the Soviet action meant or what to do about it.

Today's talks drew praise from European officials for their consultative nature. The apparent greater willingness this time of Western European states to back tough measures against Moscow was reflected in the comments of, among others, French Foreign Minister Jean Francois-Poncet.

"I did not see any significant differences [among allies]," Francois-Poncet said, adding later, "You would be greatly mistaken to think the economic and industrial interests of European countries would prevent them from drawing consequences from grave events."

With the tense Polish situation clearly dominating the attention of ministers here, tomorrow's communique was expected to include strong language warning the Soviets against an invasion and threatening grave consequences if an invasion occurs.

West German Foreign Minister Hans-Dietrich Genscher suggested that Moscow is already in violation of the Helsinki accord by massing troops along Poland's border.