I'd say he is Lord of the City, with the capacity to make laws and decrees in
the Emperor's name and command the city's military in the Emperor's name. By
my previous post on the subject, I meant to indicate he has all the powers and
duties necessary to carry out his official functions. Naturally, a new
occupant of the Iron Throne can sweep all laws and decrees away and take over
command of the military.
I don't know about the ancient position. The Imperial Chamberlain may always
have been the official commander of the Imperial Guard and lord mayor of the
city. Or maybe not.