This is very similar to the English rhyme Robert Barnes, Fellow Fine.

According to Notes on The Folk-Lore of the North-East of Scotland by Walter Gregor (1881): "The following rhyme was repeated to the child by the nurse while she took off the child's boot and imitated the blacksmith in nailing the shoes on the horse's foot…"

John Smith, Fallow Fine - Scottish Children's Songs - Scotland - Mama Lisa's World: Children's Songs and Rhymes from Around the World  - Intro Image

Notes

Here is another version from Notes on The Folk-Lore of the North-East of Scotland by Walter Gregor (1881):

"John Smith, a fellow fine,
Cam t' shee a horse o' mine.
Pit a bit upo' the tae,
T' gar the horsie clim' the brae;
Pit a bit upo' the brod,
T' gar the horsie clim' the road;
Pit a bit upo' the heel,
T' gar the horsie trot weel."

English:

"John Smith, a fellow fine,
Came to shoe a horse of mine.
Put a bit upon the toe,
To get the horsy to climb the hill;
Put a bit upon the nail*,
To get the horsey to climb the road;
Put a bit upon the heel,
To get the horsey to trot well."

*Literally a broad-headed nail.

Thanks and Acknowledgements

Translated into modern English by Lisa Yannucci.