How models call tools
For both
The model writes a structured tool request, the app runs it and feeds the result back: the mechanism behind search, code execution and agents
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
In a tool-using chat, which step is actually carried out by the model?
Check yourself · 2 of 5
How does a model learn what tools it can use in a given chat?
Check yourself · 3 of 5
In a tool loop, what does the model see when it decides its next step?
Check yourself · 4 of 5
Which of these is the best sign that an assistant really ran code for your calculation?
Check yourself · 5 of 5
What is prompt injection in a tool-using assistant?
Topics
- A tool call is generated text4 min read · The model only writes a request with a tool name and arguments; the application decides whether to run it
- Tool descriptions steer model choices4 min read · The model picks tools by reading their names, descriptions and argument schemas from its context
- The call, result and continue loop5 min read · Tool results return as context for the next step, which is how multi-step agents work
- Search, code and browsing inside assistants4 min read · Web search, code execution, file search and computer use as built-in tools in ChatGPT, Claude and Gemini
- Risks when models hold tools5 min read · Wrong arguments, invented results, injected instructions and irreversible actions
Start here
- Tool use overview (Claude docs) (opens in a new tab)DocsFree
Shows the request, tool_use, tool_result cycle and who runs each step.
- Function calling guide (OpenAI) (opens in a new tab)DocsFree
The same loop in another vendor's words: the model returns a call, your code runs it, you send the output back.
- Function calling (Gemini API docs) (opens in a new tab)DocsFree
A third vendor's version, with function declarations and how results return to the model.
Helps to know first
110 questions · last verified 2026-12