Glossary · AI & Data

Function Calling (Tool Use)

Function calling, or tool use, lets a language model return a structured request to run a named function, so an application can fetch data or take actions.

Updated October 6, 2026

Function calling, also called tool use, is a feature where a language model is given descriptions of functions and, instead of replying in plain text, can return a structured request such as a function name plus JSON arguments. Your application runs the function and sends the result back so the model can continue.

Why it matters

Language models cannot check live data or change anything by themselves. Tool use connects them to databases, search, calendars, ticketing systems or monitoring APIs while keeping a clear boundary: the model proposes the call, your code decides whether to execute it. This is the building block of AI agents and of reliable structured output.

Example

Tool definition: get_uptime(domain: string)
User: Is example.com up?
Model returns: {"name": "get_uptime", "arguments": {"domain": "example.com"}}
App runs it, replies: {"status": "up", "latency_ms": 112}
Model: "example.com is up, responding in 112 ms."

Common mistakes

  • Executing returned calls without validating arguments or checking permissions.
  • Writing vague tool descriptions, so the model picks the wrong tool or invents parameters.
  • Exposing destructive functions with no confirmation step.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.