The text of the poem is found in the Maitland Folio Manuscript where it is entitled "To The Quene" and has the postscript "Quod Dunbar of James Dog Kepair of the Quenis wardrop".
James Dog, or Doig, was a servant at the Scots court, first mentioned in the royal accounts in 1489.
[8] He put up hooks in Holyrood Palace in 1503 and bought cords to suspend the bed canopies, for the reception of Margaret Tudor.
[13] Margaret sent 'Jame Dokt' or 'Jamy Dog' as a messenger to the Duke of Norfolk at Brandspeth in October 1524, and in February 1525 she sent him to the English ambassador Thomas Magnus to ask for a loan of 300 crowns.
[14] Dunbar declares himself to be offended by James Dog's dour response when the poet asked to be issued a doublet gifted to him by the Queen.
In spite of the poet's friendly approaches Dog "barks like a common mongrel chasing cattle".
The wardrobe keeper is accused of being "A mighty mastiff" who could defend the Queen's property from even "The Great Sultan Gog Magog".