Theory of Mind for Multi-Agent Collaboration via Large Language Models