The reviver of Islam, Imam ar-Rabbani Ahmed as-Sirhindi (d. 1031H), writes in his book Ithbat an-Nubuwwa (The Proof of Prophethood):
To us, a mu’jiza is something proving the truthfulness of a person who said he was a Prophet. There were conditions for a mu’jiza:
1 — Allâhu ta’âlâ made it in the absence of ordinary means, whereby to help His Prophet be confirmed.
2 — It had to be extraordinary. Ordinary things, such as the sun’s rising in the East every day or flowers blooming in the spring, could not be mu’jizas.
3 — Others had to be incapable of doing it.
4 — It had to happen whenever the person who announced his prophethood wished it to.
5 — It had to agree with his wish. For example, if he said that he would enliven a certain dead person and if some other marvel took place, for example, if a mountain was broken into two, instead, it would not be a mu’jiza.
6 — The mu’jiza happening upon his wish should not belie him. For example, while he was miraculously talking with a certain beast, if the beast said, “This man is a liar,” it would not be a mu’jiza.
7 — The mu’jiza should not happen before he said he was a Prophet. Wonders that happened before [the announcement of his prophethood], such as ’Îsâ’s (’alaihi ’s-salâm) talking when he was in a cradle, his being handed dates when he asked for dates from a withered-up tree, and in Muhammad’s (alaihi ’s-salâm) childhood, the cleavage of his chest and his heart being cleansed by washing, there being a cloud over his head continuously and his being greeted by trees and stones were not mu’jizas, but karâmas.They are called irhâsât (preparatory signs of a prophet). They emphasized prophethood. It is possible for such karâmas to happen through Awliyâ’ as well.
Read book here