Applied AI / Forward Deployed Engineer · Agents & Tool Use · Lesson 1 of 3
Tool use / function calling — models that act
A raw LLM only produces text. Tool use (a.k.a. function calling) lets it request actions: you describe available functions (name, description, parameter schema); the model, instead of answering, emits a structured request to call one; your code executes it and returns the result; the model continues with that result.
- You define tools with a JSON schema:
get_weather(city: str),search_orders(user_id: str), etc. - The model decides whether and which tool to call and with what arguments.
- Your runtime executes the real function and returns the output to the model.
- The model incorporates the result and either answers or calls another tool.
The model never runs codeThe LLM only asks to call a tool — your code runs it. This is where you enforce auth, validation, rate limits, and safety. Treat tool arguments as untrusted input.
Why this mattersTool use is how LLMs overcome their limits: no live data → give it a search tool; bad at math → give it a calculator; can't act → give it an API. 'What can't the model do, and what tool fixes it?' is core FDE thinking.
◆ Lock it in
- Tool use = model emits a structured request; your code executes and returns the result.
- The model chooses the tool + arguments; you own execution, auth, and validation.
- Tools patch model weaknesses: live data, math, actions, private systems.
Feynman drill — say it out loudWalk through what happens, step by step, when a model answers 'what's the weather in Tokyo?' using a weather tool.
Step 1 rate your confidence · Step 2 pick your answer
In function calling, who actually executes the function?
Step 1 — how sure are you?