- All Courses
- Building LLM Applications
- Tools and Agents
- Tool calling basics
Lesson 2.1
Tool calling basics
A tool is a name, a description, and an input schema.
5mIntermediate13.7k students
Overview
The model asks, your code decides
A tool is a name, a description, and an input schema. The model can request a call with arguments; your application decides whether to run it, runs it, and passes the result back for the next turn.
That boundary is the entire safety story. The model produces a request, not an execution, so every check you need — authorisation, validation, rate limiting — belongs on your side of it.
The description is the prompt for the tool. A tool that is called at the wrong time almost always has a description that does not say when it applies.
In this lesson you will:
- Describe a tool the model can request
- Execute the call and return the result
- Understand that the model never runs your code
Resources
Notes are not saved yet — they clear when you leave this page.
Previous Lesson
Structured output and JSON schemas
31m
Designing a tool interface
14m