Certain language models have the ability to use external tools to perform tasks, like using a calculator to solve a math problem or using a browser to search for information. The most common way to share tool information with language models is to share a function definition, along with its description, for it to execute and generate a response based on the output.

In this section, you will learn how to use the tools parameter to allow language models to call these functions in your Next.js application.

You will also briefly explore rendering React components as part of a function's output, which can be useful for creating user interfaces that go beyond text.