Adapting While Learning: Grounding LLMs for Scientific Problems with Intelligent Tool Usage Adaptation