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.
The family is getting ready to view a solar eclipse. Homer and Bart, get into a fight, and Homer crushes 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, 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 Santa's Little Helper become unruly, causing Homer to drive off a bridge and landing on an island. He finds a rowboat, but it can't support Homer, Maggie, Santa's Little Helper, 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 return her. 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 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. Lisa tries to convince Marge that Maggie being in the church is helping so many people. Marge after some consideration still takes her saying she doesn't believe God would sacrifice a child for the sake of the world.
Feeling guilty for having taken Maggie away from such an important destiny, Homer tells her they gave the nuns another child to sit on their throne. Unfortunately that child is Bart, who causes the opposite of Maggie's effect and turns the chapel into Hell.