There is no doubt, as I understand, that Muhammad was a guide (Al-Hadi) for the humanity being "rightly guided one" by G-d, rather
the Head/Chief of all the "rightly guided ones" and this is one aspect of the title "Khaatam-un-Nabiyyeen" bestowed on him by G-d.
Actually, I understand from Quran, that every prophet/messenger is and has to be an Imam Mahdi and it is another title name of every one of them. Quran describes it thus:
[
21:74]وَ جَعَلۡنٰہُمۡ
اَئِمَّۃً یَّہۡدُوۡنَ بِاَمۡرِنَا وَ اَوۡحَیۡنَاۤ اِلَیۡہِمۡ فِعۡلَ الۡخَیۡرٰتِ وَ اِقَامَ الصَّلٰوۃِ وَ اِیۡتَآءَ الزَّکٰوۃِ ۚ وَ کَانُوۡا لَنَا عٰبِدِیۡنَ ﴿ۚۙ۷۴﴾
And We made them
leaders who guided people by Our command, and We sent revelation to them enjoining the doing of good works, and the observing of Prayer, and the giving of alms. And they were worshippers of Us alone.
The Holy Quran - Chapter: 21: Al-Anbiya'
[
32:24]وَ لَقَدۡ اٰتَیۡنَا مُوۡسَی الۡکِتٰبَ فَلَا تَکُنۡ فِیۡ مِرۡیَۃٍ مِّنۡ لِّقَآئِہٖ وَ جَعَلۡنٰہُ ہُدًی لِّبَنِیۡۤ اِسۡرَآءِیۡلَ ﴿ۚ۲۴﴾
And We did give Moses the Book — be not therefore in doubt as to the meeting with Him — and We made it a guidance for the children of Israel.
[
32:25]
وَ جَعَلۡنَا مِنۡہُمۡ اَئِمَّۃً یَّہۡدُوۡنَ بِاَمۡرِنَا لَمَّا صَبَرُوۡا ۟ؕ وَ کَانُوۡا بِاٰیٰتِنَا یُوۡقِنُوۡنَ ﴿۲۵﴾
And
We made from among them leaders, who guided the people by Our command, whilst they themselves were steadfast and had firm faith in Our Signs.
The Holy Quran - Chapter: 32: As-Sajdah
[
6:90]اُولٰٓئِکَ الَّذِیۡنَ اٰتَیۡنٰہُمُ الۡکِتٰبَ وَ الۡحُکۡمَ وَ النُّبُوَّۃَ ۚ فَاِنۡ یَّکۡفُرۡ بِہَا ہٰۤؤُلَآءِ فَقَدۡ وَکَّلۡنَا بِہَا قَوۡمًا لَّیۡسُوۡا بِہَا بِکٰفِرِیۡنَ ﴿۹۰﴾
It is these to whom We gave the Book and dominion and prophethood. But if these
people are ungrateful for them,
it matters not, for We have now entrusted them to a people who are not ungrateful for them.
[
6:91]
اُولٰٓئِکَ الَّذِیۡنَ ہَدَی اللّٰہُ فَبِہُدٰٮہُمُ اقۡتَدِہۡ ؕ قُلۡ لَّاۤ اَسۡـَٔلُکُمۡ عَلَیۡہِ اَجۡرًا ؕ اِنۡ ہُوَ اِلَّا ذِکۡرٰی لِلۡعٰلَمِیۡنَ ﴿٪۹۱﴾
These it is whom Allah guided aright, so follow thou their guidance. Say: ‘I ask not of you any reward for it. This is naught but an admonition for all mankind.’
The Holy Quran - Chapter: 6: Al-An`am
[
32:25]اَ
ئِمَّۃً یَّہۡدُوۡنَ بِاَمۡرِنَا
"
who guided the people by Our command".
The above is plural and it is not difficult to understand that its singular will be
Imam Mahdi.
So, in this sense
Imam Mahdi is described in Quran, at several places.
Right, please?
Regards