Homer and Bart use fireworks to accomplish things Marge has told them to do: fix a stuck shelf, demolishing Santa's Little Helper's doghouse (while promising him another one would be built by January 2007), and attempting to fix Lisa's VCR, but end up destroying her room with fireworks instead. To make it up to her, the family spends a day at the Springfield Festival of Books. There, they encounter famous authors such as Stephen King, Tom Wolfe, John Updike, and Amy Tan. While waiting in line for an autograph from Krusty, Bart strikes up a conversation with a girl named Sophie. When she gets to the front of the line, she reveals to Krusty that she is his daughter.
Sophie tells Krusty that he met her mother when she served as a soldier in the Gulf War, spending the night with her after a USO show; however, she dumped Krusty the next day after he ruined her attempted assassination of Saddam Hussein. Krusty proves a distant and unemotional father, and on a trip to the beach, he sees Homer playing with the kids and asks him for advice on how to be a good parent. Krusty and his daughter begin to bond, and Sophie shows Krusty her prized violin and plays a song for him. That night, Krusty plays in a poker game with Fat Tony, where he is dealt four aces with a king kicker, but is forced to bet Sophie's violin after running out of money and betting his Rolex watch, and loses the hand to Fat Tony, who had a straight flush (2-3-4-5-6 of diamonds).
Sophie loses her trust in Krusty upon hearing the news, and Krusty turns to Homer for help; the two attempt to break into Fat Tony's mansion while a mafia summit is being held. They find a room filled with violin cases, but most of them are filled with weapons. They attempt to sneak out with the cases, but they fall to the ground and a mob shootout erupts around them; Krusty finds the violin, and the two escape. The next day, Krusty gives the violin back to Sophie, who is delighted to find that the case has been lined with money.