There shall be a legal officer of the city, appointed by the Council, who shall serve as chief legal adviser to the Council, the Manager and all city departments, offices, and agencies, and shall represent the city in all legal proceedings, and shall perform any other duties prescribed by this Charter or by ordinance.