The mayor in any city of the second class shall have the power, when he or she deems it necessary, to require any officer of the city to exhibit his or her accounts or other papers, and to make reports to the city council, in writing, touching any subject or matter pertaining to his or her office.