For the world's foreign ministers, the opening sessions of the U.N. General Assembly each fall are the equivalent of a convention. It is an occasion when they can gather with their peers, listen politely to each other's speeches and, at endless lunches, dinners and meetings in hotel suites, renew acquaintances and try to do some diplomatic horse trading.

Traditionally, the U.S. secretary of state is the most visible figure on the scene. That was demonstrated anew by the grueling pace that George P. Shultz set in the session's first two weeks.

Between Sept. 23 and Oct. 5, Shultz had private meetings with 37 foreign ministers. He met with groups representing the black African Front Line states seeking independence for Namibia and the four Latin American Contadora countries trying to mediate the conflicts in Central America. He also played host at four luncheons to groups of ministers from the Persian Gulf Cooperation Council, the ASEAN states of Southeast Asia and the Organization of African Unity, as well as 33 senior diplomats from Latin America and the Caribbean.

In addition, he managed to find time to shuttle from New York back to Washington on related business such as the White House meeting between President Reagan and Soviet Foreign Minister Andrei A. Gromyko. One night he even took his staff out on the town.

Over the years, successive secretaries of state have pursued this U.N. schedule with such ritualistic fidelity that it is watched closely by diplomats for clues to the direction of U.S. foreign policy.

The most important part always is the meeting with Gromyko, who has conferred at the United Nations with every secretary of state since the late 1950s. Last year, when Gromyko did not attend the General Assembly, Shultz cut back substantially on the amount of time he spent there.

Conversely, this year's get-together between Shultz and Gromyko was more significant because it prepared the way for Reagan to meet with Gromyko two days later at the White House -- the president's first such session with a top Soviet official.

Shultz's U.N. meeting with Gromyko was so important to U.S officials that they set aside six hours of his time for it. The actual visit lasted only three hours, though, because the Soviet minister, in a bit of diplomatic one-upmanship, announced when he arrived at 9:30 a.m. that he planned to have lunch with U.N. Secretary General Javier Perez de Cuellar.

After Gromyko, the pecking order among the secretary's "bilaterals," as the one-on-one sessions are called, usually gives top priority to ministers from America's principal European allies, China and such perennial trouble spots as the Middle East.

Finally, there are the meetings with ministers from assorted smaller countries. These usually are half-hour sessions, with the visiting ministers wheeled in and out on a clockwork schedule.

Although these meetings do not normally produce much of substance, they are important for protocol reasons. As one U.S. official notes, "For the ministers of many very small countries, this is a big thing. Great care has to be taken to ensure that the secretary doesn't give the impression he's not sure what country he's talking to."

An aide to former secretary of state Edmund S. Muskie confided that he used to solve the problem by reducing the State Department's voluminous briefing books on each country to a single file card containing the phonetic spelling of the foreign minister's name and a couple of facts about the country's concerns. That enabled Muskie to consult the card as the minister was about to be ushered in and then greet the visitor in familiar and seemingly knowledgeable fashion.

Current department officials will not say how Shultz manages to avoid mixing up everyone on his revolving-door schedule. But, as one acknowledges, the aim is to send each visiting minister away feeling "that the U.S. government lies awake at night worrying about the same things that he does."