Brazilian President Joao Figueiredo and other officials today examined an inventory of weapons and ammunition unloaded from four Libyan cargo planes that were detained while en route to Nicaragua. The pilots prepared to leave the country after Brazil said they were free to go.

Brazilian officials detained the planes last Monday in the northern cities of Manaus and Recife after learning that they were not carrying medical supplies as the Libyans had said.

The government has not provided a description of the weapons beyond a statement by Air Force Minister Delio Jardim de Mattos that the bulk of them were of Soviet origin and that some were U.S.-made. Brazilian newspapers varied substantially in reporting what was confiscated.

The Rio de Janeiro daily Jornal do Brasil said weapons experts had found 42 tons of arms on the three Soviet-made planes at Manaus, including five tons of U.S.-made bombs, a Czechoslovak-made light training plane, eight Soviet antiaircraft guns and eight multiple rocket launchers. The weapons experts were quoted as saying that the arms were not sophisticated, in bad state of repair and possibly secondhand. No missiles or personal weapons such as machine guns or rifles were found, the paper said.

But Sao Paulo-based newspapers reported that the cargo consisted of new Soviet weapons, all of advanced technology and including two dismantled jet fighters. Jornal da Tarde said that the two fighters were packed in crates, and it quoted weapons experts as saying that wire-guided missiles, rifles, machine guns, mortars, bazookas and 90 mm cannons also were found.

Officials said that details about the weapons would be released only when a complete inventory was made, but some weapons were to be shown to reporters soon. There were no reports of Brazilian-made weapons being found.

The planes were to leave Brazil late today after the pilots again had taken charge officially of the aircraft. Air Force minister Jardim de Mattos said the cargo later would be returned by a different means to Libya, probably by ship.

Eager to resolve the question before President Figueiredo's departure for Mexico Tuesday, officials began talks on the return of the weapons with Libyan diplomats who earlier had refused to cooperate in the unloading operation.

Brazil alleges that Libya violated the Chicago convention on international air transport, article 35 of which allows nations to detain undeclared cargo.

Brazil has denied persistent reports that it received information from foreign intelligence services that led it to detain the planes. It says suspicions first were aroused when pilots could not produce cargo manifests or onward route details at Manaus.