SAN FRANCISCO (AP) _ Canes found at the home of confessed spy John Walker contained a hidden gun, a knife and vials, all classic espionage equipment, the attorney for Jerry Whitworth, on trial for espionage, said Tuesday.

Whitworth, 46, a retired Navy radioman, is charged with 13 counts of spying and conspiracy, seven of which carry potential life sentences. The prosecution alleges Walker recruited Whitworth as a spy, but Whitworth says he is innocent and is being used by Walker as part of a plea bargain.

Defense attorney Tony Tamburello won permission to elicit testimony about weapons found at Walker's home, included the canes containing the hidden weapons.

''They're tradecraft,'' said Tamburello. ''This is what spies have.'' He said a number of automatic weapons also were found in Walker's house.

Assistant U.S. Attorney Leida Schoggen said that there was no evidence that the canes were used in connection with espionage and that the defense was trying to portray Walker as ''a weapons freak.''

The prosecution does not believe the weapons ''qualify as tradecraft,'' she said. ''... They're not relevant to anything.''

But U.S. District Judge John Vukasin said he would permit the evidence in light of extensive material the prosecution had introduced from Walker's home.

Earlier, FBI agent Phillip O. Butler identified for jurors the cache of papers found in Walker's house when he was arrested. They included directions for secret meetings in Vienna and mentioned ''Jerry'' and ''Brenda,'' apparent references to Whitworth and his wife.

The documents showed that Walker kept extensive written records of his spy operation, including instructions on how to deliver classified material to the Soviets in Vienna and elsewhere.

Some of the handwritten notes shown to jurors suggested that Walker was planning to expand his spy ring, which included his son and brother.

''I plan to make myself known to a larger regiment of government and civilian organizations to see what's out there. For example, the CIA,'' said one notation.

''Brenda's situation'' was the heading on another note. ''Graduates November, '84, Ph.D. I'm considering giving her first option on location within reason. Consequently, where we go from Davis is unknown.''

The Whitworths lived in Davis and she was a graduate student in nutrition at the University of California at the time of her husband's arrest.

In other documents, Walker identified a contact known as ''D'' as ''Jerry.''

Butler also read to the jury a June 1975 letter to Walker, signed by Whitworth from a Navy base in the Indian Ocean, saying, ''I finally made my first dive.'' Whitworth was an avid scuba diver, but the prosecution contends ''dive'' was a code word for spy activities.

The letter also said future dives ''don't look real diverse'' because many of ''the things are real dated.''

The FBI also confiscated Walker's notes on Navy cryptrography equipment as well as a descrption of an exercise in the Indian Ocean and the Sea of Japan which was carried out while Whitworth was aboard the USS Enterprise and involved an intrusion into territorial waters claimed by Vietnam.