Saraswati Stitch needle-and-thread markSaraswati Stitch®contact@saraswatistitch.com
← Glossary

Definition

Function calling

Function calling is when a model, instead of answering in text, returns a structured request to run one of the tools you have given it, which is how an AI takes real actions.

A model on its own can only produce text. Function calling is the mechanism that lets it say "call the book_appointment function with these arguments," which your system then runs for real. It is the bridge between a model deciding and something actually happening.

It is the backbone of agents and automation: the model chooses the action and the arguments, your code executes it safely, and the result goes back to the model. Guardrails on which functions it may call are essential.

Related terms

  • AI agent: An AI agent is a system that uses a language model to decide which steps to take and which tools to call to finish a goal, instead of just answering a single prompt.
  • Structured output: Structured output is when a model is made to return data in a strict format such as JSON, so another system can use the result directly instead of parsing free text.
  • API: An API is a defined way for two pieces of software to talk to each other, and it is how an AI system reads from and writes to the tools a business already runs.
  • Guardrails: Guardrails are the rules and checks that keep an AI system inside safe, correct behaviour, blocking off-topic, unsafe, or out-of-scope responses before they reach the user.