Richard G. Hatcher, one of the nation's longest-serving black mayors, has been offered a job on the White House senior staff, but wants to return to Gary, Ind., before making a decision.

Hatcher met with President Carter for about 30 minutes yesterday, the White Hosue said. Press secretary Jody Powell said Hatcher and Carter found "substantial agreement" on the needs of the nation and blacks, but "did not get down to any real specifics" on what role Hatcher might play in the administration.

"The mayor is as anxious to be of help as we are to have him," said powell. "He has some obligations to his people in Gary. He wants to make sure the work he is doing will go forward."

Hatcher had no comment on the job offer as he left the White House yesterday afternoon.

In his 11th year as mayor, Hatcher is in the final stages of pulling together an ambitious economic and physical renovation plan for his small, aging industrial city near Chicago.

If Hatcher leaves, siad a Gary politician, "part of the dynamism and political clout that made the program possible would leave with him."

The picture in Gary is also clouded by a dispute over who would replace Hatcher should he leave before his terms ends.

It is not clear where Hatcher would fit in the White House hierarchy. Indications are his post would be a special assistant to the president with responsibilities for minority and Democratic Party affairs.

The senior black on the White House staff today is Martha (Bunny) Mitchell, also a native of Gary.

Hatcher would outrank Mitchell, sources said, but the question of how many layers away from the president he would be has been left unanswered.

The White House is in the midst of a major shake-up in the senior staff. Carter is said to be dissatisfied with the quality of its work.

The search for a top black staffer reportedly began several weeks ago, with meetings of officials from the administration, the Democratic National Committee, and others.

The final choice narrowed to Hatcher and Louis Martin, a former top DNC staffer who is now a part-time aide to Sen. Adlai Stevenson III (D-III.).

Hatcher is considered one of the ablest black administrators in the country. He is president of the National Conference of Democratic Mayors and a member of DNC's executive board and the boards of the National Urban Coalition, the U.S. Conference of Mayors, and the National League of Cities.

Hatcher received word of the job offer more than a week ago, sources said, and has spent the past few days weighing altenatives.

"The question he asks - and it sounds like political nonsense but it's not - is where he can be of the most use," said a closepolitical associate in Gary.