🤖Tool Use (Function Calling)
Also known as Function Calling, Tool Calling, Tool Call
A way for a model to ask an app to run a tool. The app sends back what it got.
Think of it like
Think of it like asking a grown-up to reach the top shelf. You say what you need, and they get it for you.
Example
Emma asks her assistant what the weather is in Lisbon. The model calls a weather tool with the city, gets back 21 degrees and sun, and answers.
Why it matters
It is how models reach live data and take actions. Every agent is built on it.
Definition
Example code
json
{
"type": "tool_use",
"name": "get_weather",
"input": { "city": "Lisbon" }
}Common mistake
Key takeaways
- 1Model asks. Name and inputs.
- 2App runs it. The model never does.
- 3Result goes back. The model carries on.