The United States has cautioned Syria and Israel against going to war again despite the "highly tense situation" along their mutual border, Secretary of State George P. Shultz said yesterday.

He said in response to questions about border activity that "there is a big Syrian buildup" of military forces and noted that Syrian fortifications have been moved forward in Lebanon. His was the first official confirmation of Israeli claims that Syria is building artillery and tank trenches in southern Lebanon.

"We don't believe a war between Syria and Israel would serve either party's interests, and we have cautioned against it," Shultz told an Overseas Writers Club luncheon. "It is a highly tense situation, there's no doubt about it."

However, Shultz and White House spokesman Larry Speakes appeared to be softening recent administration statements on possible Syrian involvement with terrorism, evidently to encourage President Hafez Assad to use his influence toward gaining the release of six hostages held in Lebanon.

Shultz noted that Syria "has played a constructive role in the past" to try gaining the hostages' freedom and said further such help would be "most welcome."

Speakes said Syria "continues to be helpful" and "obviously has influence" in the hostage matter. He added that there is no "conclusive report of Syrian complicity" in the attempted bombing of an Israeli jetliner in London last month.

Deputy Secretary of State John C. Whitehead said Tuesday that there is "no reason to doubt" Israeli government information tying Syria to the London incident and to the April bombing of a West Berlin discotheque in which an American man and a Turkish woman were killed and hundreds of people were injured. The subsequent U.S. bombing of Libya was in response to evidence linking Libya to that incident.

Shultz said the Israeli investigations may have "contributed to tensions" in the Mideast. Asked what the U.S. response would be to firm evidence linking Syria to terrorism, he said, "We will do something about it," but he declined to be specific.

Shultz answered questions after telling his audience that, if "Draconian" congressional cuts in his $22.6 billion foreign aid and embassy-security requests are not restored, there will be "mayhem" and "devastating consequences . . . unintended by Congress" in U.S. operations overseas.

"What's at stake is nothing less than the reversal of 40 years of constructive leadership for peace and freedom," Shultz said.

He noted that the State Department request for fiscal 1987 is only 2 percent of the federal budget but that the Senate budget resolution and the House Budget Committee had cut it between one-fifth and one-quarter. "Our resources are finite but not this finite," he said.

Meanwhile, the Senate Foreign Relations Committee, led by Chairman Richard G. Lugar (R-Ind.), voted to slash by half the first stage of Shultz's $4.4 billion request for improving security at U.S. facilities abroad, a program Shultz in his speech called "absolutely vital."

On a voice vote, the panel approved Lugar's proposal for $1.1 billion for fiscal 1986 and 1987, instead of the requested $2.1 billion, after discussing a staff report that said some requested construction projects "were poorly justified or not justified at all."

Those included a backup computer system for the State Department, $2.7 million for an ambassador's residence in Somalia, $10 million for land in Uganda and 12 public relations posts for the proposed new Bureau of Diplomatic Security. All were eliminated or drastically cut, the report said.

Staff member John Ziolkowski told the committee that the survey found security improvements necessary at all posts that were checked but that costs had been uniformly overestimated by 20 percent.

Lugar said his reduced program was "a responsible and responsive approach to an extremely serious problem."