Nothing sent yet.
Chapter 2 of 7
Your first tool
In chapter 1 the assistant guessed, because nothing joined the model to the order system. The team writes its first tool so it can look orders up.
This chapter: How does a model know a tool exists, and when to use it?
About this chapter
You will learn
- What a tool definition holds: a name, a description and a schema for its arguments
- The loop: the model proposes a call, the host runs it, the result goes back, the model answers
- Why the description decides whether the model picks the tool at all
Words you’ll meet
- Tool definition
- What the model reads about a tool: its name, a description of when to use it, and a JSON Schema for its arguments.
- JSON Schema
- A standard way to describe the shape of data: which fields, of which type, in which range.
- Host app
- The software around the model: it sends the model the question and the tools, runs the calls the model asks for, and returns the results.
- Tool call
- A structured request from the model to run one tool with given arguments, such as get_order with order_id 1042.
- Tool result
- What the host sends back to the model after running a call: the data, or an error.
Step 1 of 6
The assistant gets its first tool, get_order. Its tells the model what it does.
Open the definition they wrote.