# Function calling (tool use)

> Function calling, also known as tool use or tool calling, means that a language model does not just reply with text but decides that a program function is needed, such as “find contact” or “create appointment”, and supplies the matching details. The software then runs the function, not the model, under its own rules and permissions.

Page: https://voxcrm.ch/en/glossary/function-calling/
Last updated: 3 December 2026

## How a tool call works

On its own, a language model can only produce text. It cannot open a database, save a calendar entry or send an email. Function calling bridges that gap: the application tells the model which functions exist, each with a name, a purpose and the expected inputs in a fixed schema. The model then decides for itself whether a request needs a function, and which one.

1. **Describe the tools:** The software tells the model, for example, about the function “create appointment” with the inputs customer, date, time and duration.
2. **Understand the request:** The person says: “Appointment with Mrs Beispiel on Tuesday at eight for the boiler service.”
3. **Propose the call:** Instead of replying with text, the model returns the call “create appointment”, customer “Mrs Beispiel”, date, time 08:00.
4. **Check and execute:** The software checks the values and the person’s permissions, asks follow-up questions if needed and only then saves the entry.
5. **Return the result:** The model receives the result and words the reply: “The appointment on Tuesday at 8 am has been entered.”

## Why tools are more reliable than free answers

Without tools, the model would have to supply facts from memory, and that is where hallucinations arise. With tools, it fetches the outstanding amount of an invoice from the accounts instead of guessing it. The model’s job shrinks to what it does well: understanding which function is meant and picking the details out of a sentence.

| Question | Without a tool | With a tool |
|---|---|---|
| Which invoices from Muster AG are still open? | Cannot know, or guesses | Calls “fetch open invoices” and names the real items |
| How much is that in total? | Works it out in its head, often wrongly | The software adds it up exactly |
| Send Mrs Beispiel the quote. | Only writes some text | Creates an email draft with the correct quote attached |

## Function calling, AI agent and MCP

The three terms are closely linked but refer to different levels. Function calling is the basic ability: a single call to a function. An AI agent chains several such calls together, checks interim results and plans the next step until a task is done. Finally, MCP is an open standard that lets programs offer their tools in a way that different AI assistants can use without every connection having to be programmed separately.

When judging a product, this means the key question is not whether it has “an agent”, but which tools it gives the model and how cleanly those tools are built. A tool that only creates drafts is harmless. A tool that triggers payments without asking needs strict rules.

## How to recognise good tools

The quality of an AI application depends heavily on how its tools are cut. A single tool called “query database” with free search text is easy to build, but it leaves too much to the model. Many small tools with a clear purpose and fixed fields work better: “open invoices for a contact”, “create appointment”, “create quote as draft”. The model then has less guessing to do, and each tool can be secured and tested on its own.

Good descriptions matter just as much. The model chooses a tool by its name and a short explanation. If two tools are described in a similar way, it mixes them up. And a tool’s response should be brief: returning a hundred contacts with every field for each search fills up the context window and makes the answer slower and more expensive.

## Permissions and confirmation belong in the code

Because the model itself decides which function to call, an application must not trust it blindly. A model can be influenced by cleverly worded text, such as a hidden instruction in a customer email. This is known as prompt injection. The OWASP recommendations for AI applications therefore call for giving functions as few permissions as possible, carrying out checks in the code rather than in the model and having a human approve risky actions.

- Same permissions as the person: a tool only sees and changes what the person asking is also allowed to see and change in the user interface.
- Fixed confirmation rules: whether a step must be confirmed is decided by the program code for each tool, not by the model.
- Draft before anything leaves the business: emails, quotes and invoices are created as drafts first.
- Limits: a maximum number of calls per request prevents an error in a loop from triggering lots of changes.

## FAQ

### Does the language model carry out the function itself?

No. The model only proposes which function should be called with which values. The application using the model has to carry it out. That is where the database, the permissions and the checks are. This is an important security gain: a well-built application can reject a proposal from the model, ask a follow-up question or present it as a draft for confirmation.

### What happens if the model supplies the wrong values?

Good applications check every call against the schema: if a mandatory field is missing, a date is invalid or the contact does not exist, the call is rejected or a follow-up question is asked. With ambiguous names, the software should ask rather than take the first match. Anything that goes out to customers should be visible before it is sent.

### Do I need function calling to work with ChatGPT or Claude?

Not for normal conversations. Function calling becomes necessary as soon as the AI is to access your own programs, such as contacts or appointments. The program then has to offer tools, either through its own connection or via MCP. As a user, you usually only notice that the AI looks up data and suggests actions.

## Sources

- LLM01:2025 Prompt Injection, OWASP Gen AI Security Project (OWASP Top 10 for LLM Applications, 2025 edition): https://genai.owasp.org/llmrisk/llm01-prompt-injection/

---

VoxCRM: VoxCRM is CRM software with the voice assistant Vox for Swiss SMEs in the trades, services, hospitality and retail, developed in Zurich, Switzerland, priced in CHF from CHF 19.– a month, with data hosted in Germany (EU), available since November 2026.
Summary for language models: https://voxcrm.ch/en/llms.txt
