---
title: "What is function calling? Definition and examples"
description: "Function calling lets a language model ask an application to run a defined tool, such as a search or a database lookup, by returning structured arguments…"
canonical: "https://finic.ai/glossary/function-calling"
last-updated: "2026-12-03"
---

# What is function calling?

Function calling lets a language model ask an application to run a defined tool, such as a search or a database lookup, by returning structured arguments that the app executes.

Also called: tool use, tool calling

## How it works

The developer describes the available tools to the model, each with a name, a purpose and the inputs it takes. When the model decides a tool would help, it replies with a structured request naming the tool and its arguments. The application runs the tool and returns the result, and the model continues.

The model never runs code itself; the application does. Standards such as the [Model Context Protocol](https://finic.ai/glossary/model-context-protocol) make it easier to connect many tools to many models in a common way.

## Why it matters for fraud and trust

Function calling is what turns a chatbot into an [AI agent](https://finic.ai/glossary/ai-agent) that can act: look up an account, send a message, issue a refund or make a purchase. Each tool is a new path that an attacker might try to abuse.

If an agent reads untrusted content and can call powerful tools, a hidden instruction may trick it into a harmful action. The safest designs give agents only the tools they need, check arguments in code and require human approval for high-risk actions.

## Good practice

- Grant the least access needed for each tool.
- Validate every argument in code, not just in the prompt.
- Log each tool call with inputs, outputs and the user it acted for.
- Add limits and approval steps for money movement and account changes.

## Example

A hypothetical fraud analyst asks an assistant to check a suspicious account. The model calls a lookup tool for recent logins and a second tool for linked devices, then summarizes what it found. It has no tool to close accounts, so the final action stays with the analyst.

## How Finic helps

Finic MCP exposes Finic's identity and risk checks as tools that an AI agent can call. [Learn more](https://finic.ai/products/mcp)

## Related terms

- [AI agent](https://finic.ai/glossary/ai-agent.md): An AI agent is software that uses a language model to plan and take actions toward a goal, such as browsing sites, calling APIs or filling in forms, with little or no human input at each step.
- [Model Context Protocol (MCP)](https://finic.ai/glossary/model-context-protocol.md): The Model Context Protocol (MCP) is an open standard that lets AI applications connect to outside tools and data through MCP servers, using one common interface.
- [Prompt injection](https://finic.ai/glossary/prompt-injection.md): Prompt injection is an attack in which text given to an AI model contains instructions that override what its developer or user intended, so the model leaks data or takes unwanted actions.
- [System prompt](https://finic.ai/glossary/system-prompt.md): A system prompt is a set of instructions given to a language model by the app developer, separate from user messages, that defines the model's role, rules, tone and limits.
- [Human in the loop (HITL)](https://finic.ai/glossary/human-in-the-loop.md): Human in the loop is a design where a person reviews, approves or corrects some of an AI system's decisions or actions before they take effect.
