(O Prophet!) He means Muhammad (pbuh) (Lo! We have sent thee as a witness) that you have conveyed the message to your nation (and a bringer of good tidings) i.e. Paradise to whoever believes in Allah (and a warner) against the Fire for those who disbelieve in Him.
- 33:4545
يَا أَيُّهَا النَّبِيُّ إِنَّا أَرْسَلْنَاكَ شَاهِدًا وَمُبَشِّرًا وَنَذِيرًا
[And as for thee,] O Prophet - behold, We have sent thee as a witness [to the truth], and as a herald of glad tidings and a warner,
- common.revelation-Medinan
- common.hizb : 169