Sima Qian 司馬遷 (c. 145-86 BC) seems to have been the first historian to speak of the jester’s role, including the key characteristic of using their freedom and humour to offer advice or criticism. For example, he describes the jester You Meng 優孟 (Jester Meng) as having had:
… a fund of witty repartee at his disposal… always offering his ruler useful advice in the guise of a good joke.
Note his use of the Chinese term fengjian 諷諫 commonly applied to the jester’s way of using humour to change behaviour.
Source: `Guji liezhuan’ 滑稽列傳, in Shiji 史記, by Sima Qian 司馬遷 (c. 145-86 BC), annot. Pei Yin 裴駰 (Shanghai: Zhonghua Shuju, 1963), vol. 10, fol. 126, p. 3200; trans. by William Dolby and John Scott, War Lords (Edinburgh: Southside, 1974), p. 162.