Mastering Tool Use in LLM Applications: A Deep Dive