Skip to content
Edition NigeriaGlobal
Country: Mexico

You are in the Mexico edition. Type your country to switch.

The Americas

Set up your profile

You are learning in the Mexico edition, with examples in pesos and from Mexico.

AI agents and automation basics · Lesson 2 of 9

Tools and function calling

Models produce text; tools let them look up records, calculate exactly and request actions. This lesson explains how a tool call works, why tool descriptions are part of the prompt, which checks a request should pass and how to read a multi-tool trace.

Advanced11 min read5 steps

This lesson is complete in writing. A video for it is on its way.

What you will learn

  • By the end you can explain why language models need tools for lookups, sums and actions.
  • You can describe each stage of a tool call, from request to result.
  • You can review and improve a tool description and the instructions that govern tool use.
  • You can list the validation checks a tool request should pass before it runs, and read a multi-tool trace.

Key terms in this lesson

Knowledge cut-off
The date after which an AI model has no information from its training, so it may not know recent events, prices or rules.
Tool use
An AI model calling outside functions, such as a search, a calculator or a database lookup, to get information or take actions it cannot manage with text alone.
Function calling
A structured way for a model to request a specific software function by name with named inputs, which the surrounding software checks and runs before returning the result.
API
Application programming interface: a standard, secure connection through which one computer system shares specific data or functions with another.

Step 1 of 5

Why models need tools

Opening this step…

Step 2 of 5

How a tool call works

This step opens when you finish the one above.

Step 3 of 5

Tool descriptions are part of the prompt

This step opens when you finish the one above.

Step 4 of 5

Validating tool inputs

This step opens when you finish the one above.

Step 5 of 5

A worked trace: three tools, one task

This step opens when you finish the one above.

Key takeaways

The key takeaways open when you finish every step.

Lesson quiz

5 questions. You need 85% to pass.

The quiz opens when you finish every step.

Read first

Stockertim Learn is education. It explains how investing works and never recommends buying or selling anything.

Up next

English