There is a general principle that most of the Rabbinic ordinances prohibiting activities on Shabbat, lest they lead to something that is forbidden on a Biblical level, do not apply in the Temple. Several examples of this rule appear in the Mishnayot on our daf which discuss replacing and securing doors, bandaging wounds and fixing musical instruments.
One may tie up on Shabbat a string [nima] that came loose from a harp used in the Temple, but not in the rest of the country. And tying the string to the harp for the first time is prohibited both here and there.
Stringing a harp for the first time would be forbidden even in the Mikdash (Temple), since it should have been done before Shabbat began. (See a picture of the Temple harp or lyre here.)
The Gemara quotes a baraita which rules that when a string breaks it cannot be tied in a knot, but only in a bow, a position more stringent than that of the Mishnah. The Gemara offers a number of possible explanations for this discrepancy, suggesting that there might be a difference of opinion among the tanna’im on the matter, or, perhaps that the Mishna and the baraita are discussing different cases. The Mishna permits the string to be retied in a knot when the string is broken in the middle; the baraita permits only to tie a bow when the string is broken on the side.
Most of the commentaries explain that if the string is broken in the middle, unless a solid knot is made, the music will not sound right. If it is broken at the end of the harp, however, even a weaker knot will suffice to produce the proper sound. Rabbenu Yehonatan and the Bartenura explain this differently. According to them, the reason that one is permitted to tie a knot when the string is broken in the middle is because the Levi will certainly not leave it there after Shabbat – he will untie it and have it replaced. Therefore the knot is not considered a permanent one that would be forbidden to make on Shabbat. If the string breaks at the very edge, however, tying a knot would fix the problem and there would be no need to replace the string after Shabbat. In that case, the knot would be considered a permanent one, which is forbidden on Shabbat on a Biblical level.