Building With LLMs
Tools and agents/35 min

Function Calling

Teach models to request structured tool calls instead of pretending to complete actions in natural language.

Lesson

Function calling lets a model choose a structured action. The application executes the action, validates inputs, and returns results.

The model should never be the source of authority for side effects. Your system owns permissions, validation, and audit logs.

Objectives

Design a tool schema.
Explain tool-call validation.
Handle tool errors safely.

Practice

Write a schema for a calendar-booking tool.
List validation checks before execution.

Next action

Define one safe tool schema for an assistant.