Praise be to Allah.
It is not essential to form a specific intention (niyyah) for tawaf or sa‘i or any of the rituals of Hajj; rather the general intention is sufficient, namely the intention to perform Hajj or ‘umrah when entering ihram.
Al-Haafiz Jalaal ad-Deen as-Suyooti said:
With regard to acts of worship that are composed of several actions, it is sufficient to form the intention at the beginning, and there is no need for a new intention for each action, because the initial intention includes all of that. This applies to acts of worship such as wudoo’ and prayer, and also Hajj. There is no need to form a specific intention for tawaf, sa‘i and standing (in ‘Arafah), according to the more correct opinion.
End quote from al-Ashbaah wa’n-Nazaa’ir by as-Suyooti (p. 27).
Shaykh Muhammad al-Ameen ash-Shinqeeti (may Allah have mercy on him) said:
It should be understood that the scholarly view that is most likely to be correct, in sha Allah, is that tawaf does not need a specific intention, because the intention to perform Hajj is sufficient and includes it. This applies to all the actions of Hajj, such as standing in ‘Arafah, staying overnight in Muzdalifah, sa‘i and stoning the Jamaraat. None of these actions requires a specific intention, because the intention to perform Hajj includes all of them. This is the view of most of the scholars, and the evidence for that is clear, because the intention to perform an act of worship includes all of its parts. Just as there is no need for a specific intention for every bow and prostration in the prayer, because the intention to pray includes all of that, by the same token there is no need for a specific intention for each of the actions of Hajj, because the intention to perform Hajj includes all of them.
One of the things that the scholars quoted as evidence for that is the fact that if a person were to stand in ‘Arafah without realising where he is, it would still be valid, according to scholarly consensus. This was stated by an-Nawawi.
In addition to the view that is correct, in sha Allah, there are two other scholarly views:
The first is the view of Abu ‘Ali ibn Abi Hurayrah, who was a Shaafa‘i; this view states that specific actions such as tawaf, sa‘i and stoning the jamaraat require a specific intention (niyyah), and matters that do not require a specific action, and simply involve staying in a place, such as standing in ‘Arafah and staying overnight in Muzdalifah, do not require a specific intention.
The second view is that of Abu Ishaaq al-Marwazi, which is that none of the actions of Hajj require a specific intention except tawaf, because it is a form of prayer, and there should be an intention for prayer.
However, the view that is most likely to be correct, in sha Allah, is the first one, which is the view of the majority.
End quote from Adwa’ al-Bayaan fi Eedaah al-Qur’an bil-Qur’an (4/414).
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
This is an important matter. The intention should be formed immediately before doing the act of worship, and it is recommended to be aware of this intention throughout the prayer. This is preferable, so that the intention will accompany the deed at every stage thereof. This is what is best, but if it slips your mind during the prayer, does that harm you or not? No, it does not harm you because your action is based on the initial intention.
Hence many of the scholars – including Shaykh Muhammad ash-Shinqeeti (may Allah have mercy on him) – were of the view that it is not essential to form the intention for tawaf or sa‘i, because tawaf and sa‘i are part of an act of worship. Just as you do not form a specific intention to bow or prostrate in the prayer – because your general intention of performing prayer at the beginning is sufficient – by the same token, with regard to tawaf and sa‘i, and other parts of the acts of worship, from the time you said Labbayk ‘umratan [Here I am for ‘umrah] at the miqaat, you had already formed the intention to do all the acts of ‘umrah.
Moreover, this is easier for people. Many people – especially when it is very crowded – enter the Sacred House and start tawaf, and they forget to form a specific intention to perform the tawaf of ‘umrah or any other kind of tawaf, so if we affirm that tawaf and sa’i are like bowing and prostration in the prayer, and that the general intention includes them both, this will make things much easier for people. This is the view of many of the scholars, and it is the view that we favour. In fact many people get overwhelmed, especially when they see the huge numbers of people [in the Haram], so they enter the mosque with the intention of doing tawaf, without bringing to mind whether it is for Hajj or ‘umrah, but they still formed the intention of doing tawaf, because they came in order to do tawaf.
End quote from the shaykh’s commentary on al-Kaafi (1/384).
Based on the above, your tawaf was valid and you do not have to do anything else.
If what happened to you was simply that you were uncertain after having finished the act of worship, then no attention is to be paid to this uncertainty, because uncertainty after having done an act of worship is of no significance, and it comes under the heading of waswaas from the Shaytaan.
See the answer to question no. 67728.
And Allah knows best.