← Table of Contents · Page 136 of 868
WHAT TOOLS ARE
Part 1 of 8
LEARNING GOALS
By the end of this chapter you will be able to define a tool, explain tool calling, describe input and output schemas, and tell read-only tools from action tools.
TOOLS AS FUNCTIONS
A function, in programming, is a named, reusable recipe.
You give it some inputs, it does some work, and it hands back an output.
A calculator's square root button is a function: you give it 49 and it returns 7.
A tool is a function the agent can call to affect the outside world, or to learn something it did not already know.
The words "affect" and "learn" cover two broad jobs.
Some tools bring information in, such as looking up a stock price, reading a file, or searching a database.
Other tools push change out, such as sending an email, saving a file, or deleting a record.
Every tool, from the simplest to the most elaborate, is built from four ingredients: a name, a description in plain language, a definition of the inputs it needs, and the actual code that runs when it is called.
Advertisement
Read Aloud:
0:00 / 0:00