When The Irresponsible Captain Tylor is captured by the Raalgon and made into Empress Azalyn's pet, he takes it upon himself to fulfill this role during Court, calling out the Treacherous Advisor Wang on exactly how he's trying to manipulate the empress as well as loudly and publicly speculating over his motives.
Discworld: In Wyrd Sisters, the Fool is a classic jester who spends most of the book reluctantly advising the usurping Duke. He later becomes king himself, and is shown to be a kind Reasonable Authority Figure, and an optimistic by disc standards.
In one of the diaries, it's revealed that all court jesters are actually spies for their guild. They send everything they overhear back to the chief clown, who profits enormously.
A more benevolent version of this occurs in Alan Gordon's Fools Guild mystery novels, in which the eponymous Guild are essentially a continent-spanning spy ring who try to manipulate their patrons into averting war, or running damage-limitation if that doesn't work. The main character, Theophilos, is stated to be Feste from Twelfth Night, and is heavily implied to be the Fool in King Lear. Oh, and he's Laertes from Hamlet, as well. Sort of. Look, just go read the books, they need the love.. Some of Shakespeare's other jesters, such as Yorick and Lavache, pop up too, if only in flashbacks.
Orr from Catch-22 is comically absurd, and nobody takes him seriously. Eventually the protagonist realizes that his erratic behavior was part of a plan to defect from the Air Force, and that Orr was hinting he should come.
In one of Isaac Asimov's Foundation books, the court jester of Kalgan joins the protagonists. It turns out that he was the Mule, king of Kalgan.
In Guy Gavriel Kay's Tigana: The court jester is magically bound to the King, acting out his subconscious urges, but there's a twist.
Beldin from David Edding's The Belgariad and The Malloreon series; as a twisted, hideous hunchback, he can say and do just about anything he wants because everyone's staring at the hump on his spine. He's also an impossibly powerful sorcerer, however, and at one point magically disguises himself as a "standard" jester, nailing home the resemblance.
Onimi from the New Jedi Order series is the slave jester to Supreme Overlord Shimrra of the Yuuzhan Vong. His position as Shimrra's 'pet' allows him to mock the Elite mercilessly in a way no one else can, and he seems to take great pleasure in being as offensive as possible. He's also the true power behind the Yuuzhan Vong throne, using Mind Control to speak his wishes through the practically brainless Shimrra's mouth.
The Fool, of course, in Robin Hobb's Farseer trilogy. As noted above, being a court jester means you can speak your mind more freely than others ... but it should also be noted that this only works while your king protects you.
Christopher Moore's Fool stars a King Lear's jester, and his ability to speak truth to the powers that be is one of the biggest themes in the book.
In the Chivalric RomancesGowther and Robert The Devil, the title characters work as jesters for kings, in a position of penance for their many crimes; they appear three times as knights to save the kingdom but remain the jester inbetween.
In The Stormlight Archive, the Alethi king has a position known as "the Wit" whose primary role is to humiliate and humble the various "lighteyed" lords and ladies by mocking them. It's technically legal for a slighted lord to kill the Wit, if he is willing to revoke all his lands and titles.
Gideon Gleeman from the RuneScape novels Return to Canifis and Legacy of Blood. Though he looks like a harmless fool, he's actually a very powerful mage tasked with protecting King Roald.
In one second season episode , Vila actually has to perform as a jester. He also sees the old guy, who was locked up.
Sommers from The Six Wives of Henry VIII, based on a historical person. He was the only one in the court who could speak frankly to Henry without fear of reprisal (and that's something Henry wouldn't even allow his own wives to do.)
The same character also appears for an episode in The Tudors, where after Jane Seymour's death he is the only man Henry will speak to at all in his grief. At the end of he episode, Sommers is shown sitting on Henry's throne, wearing his crown, and chuckling to himself... but he doesn't appear again in the series.
The All There in the Manual backstory of emcee Fleur in Alegria reveals he was this to the now-lost ruler of the kingdom. As the only person the foolish, corrupt nobles could think to turn to, this brought out his true Monster Clown nature as he became their leader.
Godspell is based around this concept; although Jesus and his disciples are commonly mistaken for "hippies" by audiences because of their crazy way of dressing, they were originally intended to be "clowns" and are referred to in the script as such. Jesus is chief clown and teachers his disciples (who don clown makeup to signify that they are following him) about the world through jesting and slapstick, which they also adopt.
In Warhammer40000, the Laughing God was this to the Eldar pantheon. This is also the reason he is one of the only Eldar gods left. His mocking nature distanced him from the decadence that birthed Slaanesh and doomed most of the other Eldar gods.
One of the 2nd edition Dungeons & Dragons expansion books had a Jester playable class. This was mainly for "theatrical" players — it could taunt and distract enemies with insults, but lacked the combat abilities to survive the consequences. There's also a homebrew 3.5 edition version that is quite a bit more capable.
Persona 4Golden introduces the Jester Social Link that corresponds with Adachi (each Social Link stands for a different Tarot card). The arcana serves as an alternative look at The Fool card (which symbolizes the protagonist). Both the Fool and the Jester arcanas symbolize ignorance and freedom, but the Jester stands for suppressed stupidity along with freedom misused for trouble-making and finding the easy way out of situations. All of this foreshadows that Adachi is the serial killer the heroes are hunting down.
Truth in Television: Stanczyk, the court jester of Poland, became a Polish national hero two centuries after his death, during the period when Poland was no longer an actual nation, for his ability to speak the truth in couched terms.
The Motley Fool, a financial advising company best known for its newspaper column, plays to this trope. Unusual for the industry and befitting the moniker, their advice tends to be of the "invest in solid companies and funds and hold onto them for a long time" variety rather than promising easy money if you buy loads and loads of particular "sure thing" stocks.
Jon Stewart and Stephen Colbert. When people complain about their status as sources of actual news, they're ignoring a few key factors. No, satire has never had a meaningful impact on history. Thomas Nast was a figment of your imagination.
King Matthias of Hungary had a legendary court jester who appears in several folktales and novels (though it's unclear whether they were all the same person). More notable deeds include proving that doctors are the most common profession by pretending to be sick, prompting the entire staff in the palace to try and cure him, impersonating the king and negotiating a highly disadvantageous treaty with the Turks, but including a clause that makes it inapplicable, and wrestling the jester of an enemy king, in a failed attempt at Combat by Champion.
Archibald Armstrong, the court jester of James VI, who relentlessly castigated other members of the court; at one point, the duke of Buckingham threatened to have him hanged, to which he replied "dukes had often been hanged for insolence but never fools for talking."
William Sommers, court jester of Henry VIII, who frequently used his jests to call attention to extravagance and waste within the royal household.
The Japanese equivalent of a jester, the Taikomochi, doubled as an entertainer and a military strategist and was expected to fight alongside their lord in battle, making them a literal Lethal Joke Character. The overlap in roles makes more sense when you realize that both require similar skillsets: Quick wit and the ability (and close relationship with their lord) necessary to speak truth to power.