The city attorney shall be appointed by the city council, and shall have the following duties:
(1) To serve as legal advisor to the city council, the clerk, the finance director, the tax collector, and all city departments, officers and agencies;
(2) To represent as counsel the city, its officers, agents or employees, in any legal action arising out of or connected with the proper functions of the city, unless disqualified so to act;
(3) To draft such ordinances, resolutions and documents as requested by the council.