Cowboy diplomacy!
I've been watching TOS again recently, and he emphasizes the importance of the prime directive a lot more than I remembered.
However, he's always like "Let's just go talk to them - see what they're like. We won't tell them anything."
situation occurs
"Ok, the only way out is if we tell you everything."