Lisa infiltrates a convent in order to steal back Maggie who was accidentally taken in by nuns. While in the convent, Lisa uncovers a series of cryptic clues leading to a hidden jewel in Springfield. With help from resident history buffs Principal Skinner and Comic Book Guy, Lisa sets off to find the coveted prize. But Springfield's Freemasons are also hot on the trail of the jewel, and Lisa must race against them to find the jewel and rescue Maggie.
At the beginning of the episode, the family is together trying to view a solar eclipse. Homer and Bart, however, get into a fight, causing Homer to crush his camera obscura device, which every member of the family has to view the eclipse. Marge, out of pity, gives Homer her device, leaving her as the only one not able to see the eclipse. Not wanting to miss out, she looks at the eclipse directly, which causes damage to her eyes.
She is taken to Springfield General Hospital (sign outside: "If you died here, you'd be home now"), where Dr. Hibbert informs them that Marge must keep her eyes completely bandaged for two weeks (or suffer "Tex Avery syndrome", in reference to the protruding eyes in such cartoons as Riding Hood), and must avoid all stress.
Homer tries to take care of Marge, only to soon find that there are rats in the kitchen. The rats direct him to make a gourmet meal, which turns out to be "good — but not great," so he goes in search of rat poison.
In the car, Maggie and the dog become unruly, causing Homer to drive off a bridge (shouting "Why did I bring the baby and the dog to the poison store?"), landing on an island. He finds a rowboat, but it can't support Homer, Maggie, the dog, and the poison, so he must make several trips. He tries to ask Professor Frink to help, but accidentally throws a rat poison pellet into his mouth, making him pass out. After the first crossing, he leaves Maggie on the doorstep of a convent to keep her safe while he returns for Santa's Little Helper and the rat poison. The nuns take Maggie in, and refuse Homer's plea to "give her back so I can take her home to my rat-infested house." Lisa tries to infiltrate the convent to rescue Maggie, and discovers a series of messages that could lead her to a coveted jewel. She gets help from Principal Skinner and Comic Book Guy, but the Freemasons (led by Mr. Burns) discover her plans and try to get the jewel before she does. Meanwhile, Homer tries to keep Maggie's disappearance a secret from the temporarily-blinded Marge.
Mr. Burns and Waylon Smithers trap Lisa, Skinner, & Comic Book Guy under the Springfield Sign, the largest RING in Springfield. Lisa tells Burns to let her live because only she can solve the mystery. Burns orders Comic Book Guy & Skinner to dig their own graves. Comic Book Guy prays to Superman to help him to dig his grave. Lisa sees an anagram on the individual letters of RING, and she deduces that she herself, is the Jewel. She goes to the convent where she tells them that she's the Jewel. The nuns tell her that Maggie's the Jewel, and they tell her the real answer, which she tells them only makes sense if she gets it wrong first. When Maggie sits on the throne in the church, a ray of sunlight splits into a rainbow when it touches her. Various residents of Springfield get along with each other, including the electric chair getting turned to "massage" during Snake Jailbird's execution. Lisa also tells them that less road rage has been reported in Shelbyville. Marge bursts into the church, takes her bandages off, & takes Maggie back. Bart sits on the throne instead, causing the chapel to become Hell.