Q: What is tool calling (function calling)?
Tool calling is how an LLM acts on the world instead of only talking about it.
Here's the mechanic, step by step. In your code, you write a normal function — say, one that sends a notification to your phone. In your API request, you describe that function to the model: its name, what it does, what parameters it takes. Now, when a user says "remind me about the meeting," the model doesn't run anything (it can't — LLMs can only produce natural language text, not run tools). Instead, it replies with a structured request: call send_notification, with message = "Meeting reminder." Your code needs to recognize that request, run the actual function, and send the result back to the model, which then uses it to finish its answer.
That's the whole trick: the model decides what to do, your code does it on behalf of the model.
One call is useful (look something up, send a message). The real power arrives with multiple and consecutive calls: the model chains tools together, using one result to decide the next call. Follow that thread and you arrive at agents, which is why tool calling is the single most important mechanic to learn deeply.