Hi,
I have checked the information that I have regarding James Robertson and Margaret or Martha Clarkson. They were married in 1777 at Bo'ness, which lies within what is now West Lothian in Central Scotland. I have 10 children listed for them but none of these are named Thomas.
You will be able to search for Thomas in the Old Parish Records that are available online via the ScotlandsPeople website. However, these records date from before the time of statutory registration in Scotland and will not necessarily list every birth/baptism that took place.
I am sorry that I could not be of more assistance here.
Regards