Quick search by citation:

22 U.S. Code § 3904 - Functions of Service

Members of the Service shall, under the direction of the Secretary
represent the interests of the United States in relation to foreign countries and international organizations, and perform the functions relevant to their appointments and assignments, including (as appropriate) functions under the Vienna Convention on Diplomatic Relations, the Vienna Convention on Consular Relations, other international agreements to which the United States is a party, the laws of the United States, and orders, regulations, and directives issued pursuant to law;
provide guidance for the formulation and conduct of programs and activities of the Department and other agencies which relate to the foreign relations of the United States; and
perform functions on behalf of any agency or other Government establishment (including any establishment in the legislative or judicial branch) requiring their services.