Iran's new armed forces chief of staff said today that the revolutionary government would no longer tolerate secret U.S. listening posts in the country. But he said Iran would probably honor agreements with the United States not to transfer American weapons and military technology to other countries.

In a news conference, Maj. Gen. Mohammed Vali Gharani also left the door open for the return to Iran of American defense contract personnel. He indicated, however, that his government would prefer to employ other experts from "friendly countries."

Gharani said Iran may turn to France in the future for military advisers.

Diplomatic sources considered it doubtful that Iran could find sufficient numbers of qualified non-American defense contract personnel to help operate and maintain all the sophisticated weaponry, notably U.S. aircraft and their advanced armaments, that Iran purchased during the rule of Shah Mohammad Reza Pahlavi. The sources said that if Iran did not want U.S. technicians back, or if they were unwilling to return, much of the equipment would probably be left idle.

Gharani indicated, however, that Iran would continue to buy spare parts for its existing equipment from the United States. The cost of maintaining Iran's established arms programs -- including training, spare parts, maintenance, construction and other factors -- has been estimated at about $2 billion a year.

Asked if the new government would honor previous U.S. agreements with the shah's government banning the resale or transfer of American weaponry to other countries, Gharani said, "That depends on the policy of the government. But I believe Iran will not abrogate what it has promised."

Iran's new friendship with the Palestinians has aroused concern among U.S. officials that American-supplied arms could fall into the hands of Palestinian guerrillas.

The general, who was dismissed from the army by the shah 20 years ago for opposition activities, said he knew nothing about secret U.S.-supplied electronic surveillance installations here, but that "in the future there will not be that sort of thing in Iran."

The surveillance facilities are mostly aimed at monitoring Soviet weapons deployment and military signals, informed sources have said.

Gharani denied that any U.S.-supplied sophisticated weapons, such as the F14 fighter and its secret Phoenix missile, have left the country.

Concerning the revolutionary government's efforts to rebuild the armed forces, Gharani said all three-and four-star generals were being retired and younger officers promoted to "rejuvenate the army."

He said Iran would not change its military system of command to satisfy some revolutionaries' demand that officers be elected. Nor would the armed forces allow any secessionist movements to succeed, he said.

With only about half Iran's soldiers having returned to their barracks despite orders to do so from Ayatollah Ruhollah Khomeini, the government today extended by another week the deadline for reporting to duty.

Gharani conceded that the appeal has had especially limited response in Tehran following the Feb. 10-11 rebellion that overthrew the Iranian monarchy.

Throughout the news conference Gharani struck observers as having an incomplete grasp of his new position. Perhaps illustrative of the confusion currently besetting the dual administrations run by Khomeini's revolutionary committee and the government of Prime Minister Mehdi Bazargan was Gharani's statement, in reply to a question, that he takes orders from both.