In this EMH-centric episode the fictional USS Voyager spacecraft, lost on the wrong side of the Galaxy has a run in with some mysterious aliens.
Among other ego-fulfilling fantasies, the daydreams include one where he becomes the "Emergency Command Hologram" and defeats an attacking alien vessel using a fictional deadly photonic cannon.
The Doctor finds that his daydreams are occurring when he doesn't want them to, a side effect of his faulty programming, and the crew disables the new routines.
As Voyager's crew becomes aware of the approaching Hierarchy ships, Janeway arranges for the deception to be complete, temporarily turning the Doctor into the Emergency Command Hologram.
Janeway commends the Doctor for his performance and arranges a team to evaluate the prospects of putting the hologram in charge of the ship under emergency situations.
Writer Joe Menosky describes the episode as "five days of scriptwriting paradise" because "the story itself becomes your friend and collaborator; it is rich enough to support you and keep feeding you ideas as you execute the script.
[7] The Hollywood Reporter rated "Tinker, Tenor, Doctor, Spy" the 7th best episode of Star Trek: Voyager.