Mira Romaine, a Starfleet lieutenant on her first space assignment, was heading for Memory Alpha, where she was to be a librarian. The planetoid had been designed as an open research facility containing records of all Human knowledge. On the way, a community of alien beings' thoughts tried to take over Romaine's body, but she was able to resist. Although the beings had killed everyone on Memory Alpha and caused catastrophic damage to the databases, Romaine went back there to try to rebuild it. (TOS: "The Lights of Zetar")
After being captured on Delta Theta III, James T. Kirk remarked, "There are times, Mr. Spock, when I think I should have been a librarian." Spock observed, "The job of librarian would be no less challenging, captain, but it would undoubtedly be a lot less dangerous." (TAS: "Bem")
In a memo Associate Producer Robert Justman wrote Producer Gene Roddenberry (on 7 June 1966), Justman critiqued that he thought the way the librarian was written seemed extremely "forced." He further commented, "I think it would be much better dramatically to actually see the Librarian disappear when Charlie gets mad at him. This gives the audience information that the rest of the ship's Crew does not yet have and therefore gets them worried earlier."