I mentioned that I would discuss poorly written stories in order to discover what makes stories good or bad. One of these is the Mary Sue. There are a number of definitions of Mary Sue (and Gary Stu). A Mary Sue may refer to a self-insert character, an overly idealistic character, an author avatar or many other options. For the purpose of this discussion, I stipulate that Mary Sue (or Gary Stu) are limited to characters that are problematic in some way by definition. I will also stipulate that Mary Sues will include all characters under the common usage of that term that happen to be negative whether by definition or otherwise. (This includes characters that are male in addition to those that are female.) Mary Sues are those characters that have traits (whether accidentally or essentially) that are too good for the genre and those traits draw the readers attention to the character.
There are some definitions of Mary Sues that are not always negative. A self-insert character is not necessarily negative. It is at least theoretically possible for a self-insert character to be a realistic character in a story, avoid breaking the suspension of disbelief and be as essentially unproblematic as any other character. Author avatars can also be realistic characters, for much the same reasons as self-insert characters. Original characters (in a work of fan fiction) can also be done well, even as a protagonist. There are even some definitions of Mary Sue that are even less negative: a protagonist that you do not like, a cliche character or a character that is alien to the original setting in some way.
A Mary Sue could be an overly idealistic character. It is important to note that an overly idealistic character in one work may not be so in another. For example, the genre of the work may change whether or not the character is overly idealistic. In a work of superhero fiction, a super genius is simply someone with a superpower. In a work of detective fiction, a super genius to too smart to be realistic. So such a thing will count when considering whether or not a character is a Mary Sue in detective fiction but not in superhero fiction. Nonetheless, there are characters who are completely realistic, but because of sheer power, knowledge or friends distort the plot around themselves. Such characters count as a power fantasy or center of attention Sues. Therefore, simply being overly idealistic is too narrow to be a Mary Sue.
There are a number of plausible traits that could be involved in some way in the definition of a Mary Sue. One of these is characters that break the suspension of disbelief by being too good. Another is characters who overcome problems too easily because of too much power, a lack of flaws, an implausible amount of knowledge or simply an unrealistic amount of luck. Finally, a trait sometimes seen by Mary Sues is distorting the plot by gaining too much attention, or by changing events too easily.
This should be enough to mention two commonalities present in all Mary Sues. All Mary Sues have at least one trait that is too good to be realistic given the genre. It might be accidental to the character (they happen to be too lucky) or it might be essential to the character (they are super intelligent). Second, this trait draws the attention of the reader to the character.
These two traits are sufficient to define the term Mary Sue given the stipulations I have mentioned. Mary Sues are characters who have at least one trait that is too good to be realistic given the genre and the traits draws the attention of the average reader to that character. This means that merely having a trait that is too good to be realistic is not sufficient for a character to be a Mary Sue if that trait is hidden well enough from the reader. It also means that drawing too much attention to the positive yet realistic qualities of a character is not enough on its own for a character to be a Mary Sue.