AI Tool Calling: Cut LLM Inference Costs with Code Gen