Function Calling
Definition
Function calling is a capability that lets a language model request that a predefined function or API be run — returning the function name and structured arguments — so the model can fetch live data or take actions instead of only generating text.
How it works
You give the model a set of functions with descriptions and expected parameters. When a request needs one — say, looking up an order — the model doesn't run the code itself; it outputs a structured call (the function name plus arguments like the order number it extracted). Your application executes that call, returns the result, and the model uses it to write the final answer.
This is the mechanism behind tool use and agentic behavior. It reliably bridges free-form language and structured systems, because the model emits clean, machine-readable arguments rather than prose you'd have to parse.
Why it matters for support
Function calling is what turns an AI agent from a talker into a doer. It's the underlying mechanism that lets an agent call your order system, issue a refund, or update a record — the technical foundation of custom tools and the move from deflection to genuine resolution.
Frequently asked
What is the difference between function calling and tool use?
They're closely related. Function calling is the model's ability to emit a structured request to run a function; tool use is the broader pattern of an agent actually using those functions (and other tools) to accomplish tasks.
Does the model run the function itself?
No. The model decides a function is needed and returns its name and arguments in a structured format. Your application executes the call and passes the result back to the model to continue the conversation.
Related terms
Tool Use
Tool use is the ability of an AI model to invoke external functions, APIs, or systems — like looking up an order or issuing a refund — instead of only generating text, so it can act on real data rather than just describe it..
Agentic AI
Agentic AI is AI that doesn't just answer questions but takes actions — it plans multi-step tasks, calls tools and APIs, and works toward a goal end to end with little or no human intervention..
Custom Tools
In Macha, a custom tool lets an AI agent call any HTTP API endpoint you configure — so an agent can read live data or take an action in a system Macha doesn't have a built-in connector for, without waiting for a marketplace app..
Entity Extraction
Entity extraction is the process of pulling specific pieces of structured information — like names, order numbers, dates, products, or amounts — out of unstructured text so a system can act on them..
Large Language Model (LLM)
A large language model (LLM) is a neural network trained on vast amounts of text to predict and generate language, enabling it to understand questions, summarize, classify, and write human-like responses..
Put these ideas to work
Macha is an AI agent layer that sits on top of the help desk you already run — Zendesk, Freshdesk, Front, Intercom, or Gorgias.
Start Trial
Zendesk
Freshdesk
Gorgias
Front
Shopify
Stripe
Slack
Notion
Google Workspace
Confluence