"I said I wouldn't use magic that affects living things," Loki says. "If I thought that applied to illusions that don't disguise anyone I would have asked for chalk to do my spellwork in rather than doing it as you saw. Do you think I shouldn't?"
"My vision is much worse than yours. It's much less inconvenient in a world built for eyes like mine." Loki makes a soft lamp of light hover above her head and steps into the darkness.
"Hello," says Loki, inclining her head politely. "I am Loki Odinsdottir, stranded in Middle-earth from another realm by accident."
Ah, that must be what Lúthien meant. "What are you working on?"
"May I ask what you're most recently trying and what materials you have? I was not a metallurgist, but my people had many ages of practice in the craft and I did not ignore it altogether. I may be able to provide some useful hint."
"Yes," she says, "but they prize fine weapons very highly and had no subterranean neighbors, so they practiced and studied a great deal." And then she starts naming substances - thank you, Thor, for hours of weapons geekery comparing this lance to that axe - and their virtues and composition, starting with the ones she was surest of.
Loki apologizes for her spotty knowledge but winds up giving a more specialized version of her impromptu chemistry lesson. Do you have titanium? Here is what she remembers about how to get hold of aluminum if you can find it, but it is not state of the art as arms or armor for anything except arrowheads in this alloy, she does not remember the exact composition...
"I will be delighted to come back later, although we've all but exhausted my memory," Loki apologizes to the dwarves. "It was a pleasure to meet you."
"What? No, it was good of him, I have no direct experience with projectile weapons and their efficacy against Balrogs and assume you are correct, and of course steel is useful."
"I would have traded you if I could have. I was a dangerously clumsy child and I was happier with a book than trying to make up for my inability to do footwork with archery. I was only ever able to please my family when I finally found a way to cheat."
"What I mean is that I invented my first spell and it cured me of my poor coordination. They still don't know I did that. They think I grew out of it. And I think the situation would be substantially worse than 'temporarily exiled to a planet of my choice to give Odin time to think' - however stray my transport went - if they knew that I have never held a melee weapon without relying on magic I cast myself to do it."
"They don't see it that way. They think it's dishonorable to use magic in combat - an enchanted weapon is fine, however flashy its effects, but not sorcery cast by the warrior herself. It's... Is there a concept of a 'war crime' here? A thing you do not do to your enemies or prisoners even if they are absolutely trying their hardest to slaughter everyone you know, even if they wouldn't hesitate to do that thing to you given the chance, something that is simply not part of the repertoire at any price."