Skip to main content

What is function calling, or tool use?

The AI Glossary

In our classes, we often pause to explain the ideas behind AI and the language used to describe it. These posts grew out of those conversations. They’re for anyone who would like to understand AI better, with no technical background assumed.

Function calling lets a model request an operation from another piece of software. The model produces a structured request describing which function to use and what information to pass to it. The surrounding application checks and executes the permitted request, then returns the result.

A function is a defined operation, such as searching a document collection or checking an appointment. Developers describe its purpose and inputs. An input might be a date, a search phrase or a record identifier. These values are often called arguments or parameters of the function; they are not the model’s learned training parameters.

For example, a model may request “find available appointments” with a specified service and date range. The booking software performs the search. The model can then use the returned availability to prepare a response. It has not established availability merely by generating a plausible time.

This separates language-based interpretation from actions that require an actual connection. A calculator tool performs arithmetic; a model can explain the result. A database tool retrieves a record; a model can summarize the permitted information. Tool use can improve reliability, but a wrong request or misread result can still produce an error.

The application should validate requests, enforce access limits and handle failures. Reading a record, proposing a change and making that change should be separate permissions where their consequences differ. A description in a prompt cannot substitute for those controls.

A clinical operations assistant might use a tool to check whether a referral document has arrived. If the connection fails, it should report that it could not check—not conclude that the document is absent. If it requests a write action, the system should confirm the actual outcome and avoid accidental duplication after a retry. The visible conversation is only part of the process. Reliable tool use depends on well-defined requests, trustworthy results and a clear record of what the software really did.

Sources: Anthropic — Building Effective Agents (2024); MDN — API

To learn more, take a look at the AI in Health Care Certificate of Specialization from the Advanced Learning Academy at Harvard T.H. Chan School of Public Health. You can take an individual course or work toward the full certificate.


AI is a fast-moving field. This explanation reflects our class discussions and related material at the time of writing. Terminology, capabilities and tools may change.

For suggested additions or corrections, please email me at tpanch@hsph.harvard.edu.

Dr. Trishan Panch
Program Director, AI in Health Care
Harvard T.H. Chan School of Public Health — Advanced Learning Academy