The city commission shall appoint a city attorney and shall provide for the payment of such attorney for services rendered to the city. The city attorney shall be responsible for representing and defending the city in all litigation in which the city is a party, may be the prosecuting officer in the municipal court, shall attend the meetings of the city commission as directed, shall advise the city commission, city manager, and other officers and employees of the city concerning legal aspects of the city's affairs, and shall perform such other duties as may be required by virtue of the position of city attorney.