Did you know Nier: Automata is a Square Enix game? because of this, there are some references to Final Fantasy in the game, most notably the inclusion of the Final Fantasy XV Engine Blade, the default weapon of Noctis. Here is how you can get it. Note that it can only be used after your first playthrough.
First, you need to be toward the end of the game, specifically when you escape from the Factory. Proceed past the conveyor belt with dangerous enemies to the nearby tower, fight the machines inside, and exit the room.
When you get to the stairs, you're going to want to look for a break in the railing. Face outward, double jump, and glide onto the nearby Pod. It is here you will find the Engine Blade.
Congratulations!

Embark on an inspiring mission of human connection beyond the UCA. Sam — with companions by his side — sets out on a new journey to save humanity from extinction. Join them as they traverse a world beset by otherworldly enemies, obstacles and a haunting question: should we have connected?