She is the protagonist of a short story called "Fan Fiction" written by Visiting Professor Shaenon K. Garrity and illustrated, as usual, by Professor Phil Foglio. It tells of her attempt to make a Heterodyne Boys story "more interesting" for her younger siblings (and herself) by introducing an exciting romantic interest for one of Our Heroes. Unsurprisingly, the heroine has something of a resemblance to Mary herself.
Now, as we all know, a little self-projection never hurt anybody unless it went right overboard into Maria Antonia Fantasia Philomel (call her "Marietta", Bill does) not only goes overboard (rather literally) but into a full Esther Williams water follies act.territory [suddenly looks suspicious and whips head around to stare at 'Mary' again]. Unfortunately,
Despite this, she means well and means to entertain her unappreciative siblings; but she comes by it naturally, as her mother reveals her own Dark Secret to her daughter as the household retires for the evening.
It's impossible to tell from context exactly when Mary exists in relation to Agatha; it has to be within the last 20 years, likely less, as there are plenty of Heterodyne Boys books and posters of Bill (is that a shrine?) in Mary's room. Also, a girl like Mary would probably love stories of a young woman like Agatha, so the easiest guess would be that they are contemporaries.
However, any analysis like this is overthinking the story horribly, even with that suspiciously lamp-like object at Mary's bedside.