Macha
AI Support & Agents

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.

Also known as: tool callingtool usestructured function invocation

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.

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