What is function calling?
Function calling (tool use) is a method that lets a language model state, in a structured format, which predefined function it wants to call and with which arguments. It is how a model moves beyond writing text: it can look up an order, create a record or read live data. The model never runs the function itself. Your application does, so permissions and control stay with you.
Definition
Function calling (tool use) is a method that lets a language model state, in a structured format, which predefined function it wants to call and with which arguments.
How does function calling work?
Your application gives the model a list of tools it may use. Each tool has a name, a description and a parameter schema. The large language model reads the user’s request and, if it needs a tool, returns the tool name and arguments as JSON. The model does not run the function. Your code does. The result goes back to the model, which writes its answer from that result.
When should you use function calling?
When the model needs current data or has to act in a system. Checking an order status, booking a meeting and writing a note to the CRM are typical cases. AI agents use the same mechanism repeatedly to carry out multi-step work. If several AI applications need the same tools, the Model Context Protocol moves those definitions into a shared standard.
What should you watch for?
Separate read operations from write operations. Looking up stock is low risk. Issuing an invoice or changing a customer record should require human approval. This applies equally to SAP or Microsoft Dynamics and to Turkish ERPs such as Logo, Mikro or Netsis.
The model can fill in arguments incorrectly or call a tool it does not need. Validate every call in your own code, check the user’s permissions and log the calls. When a tool returns personal data, limit which fields reach the model, in line with GDPR and, for data processed in Türkiye, KVKK, Türkiye’s data protection law. Clear tool descriptions matter as much as the code. They tell the model when a tool should and should not be used.
Further reading
Copilot Studio or a custom AI agent?Platform or custom build: how data sources, MCP, governance, maintenance load and the drivers of cost compare.
Connecting AI agents to systems with MCPIntegration patterns, authorization, prompt injection controls and human approval for connecting AI agents with MCP.
AI-powered process automationWhere language models fit into business workflows, which process to start with, and how to set up human approval, data protection and measurement.Related terms
- AI agentAn AI agent is software that uses a language model to decide which steps to take towards a goal and then carries out those steps with tools such as APIs, databases and email.
- MCP (Model Context Protocol)MCP (Model Context Protocol) is an open protocol, introduced by Anthropic in November 2024, that gives AI applications a standard way to connect to tools, data sources and business systems.
- LLM (Large Language Model)An LLM (large language model) is an AI model trained on very large amounts of text that answers questions, summarises, translates and writes by predicting what text should come next.
- API integrationAPI integration is a way of connecting two or more software systems so that they exchange data and trigger actions through the application programming interfaces (APIs) each system exposes.
- AI GuardrailsAI guardrails are technical controls that check the inputs, outputs and actions of an AI application in order to block unwanted behaviour.
Frequently asked questions
Are function calling and tool use the same thing?
In practice, yes. OpenAI's documentation mostly says function calling, Anthropic's says tool use. In both, the model does not execute anything. It only states which tool it wants to call and with which arguments.
Does the model execute the function itself?
No. The model only produces a call request. Your application executes it. That is why permission checks, argument validation and logging belong in your own code.
What is the difference between function calling and MCP?
Function calling is how a model expresses that it wants to call a tool. MCP is a protocol that exposes tools to different AI applications in a standard way. Tools offered through MCP still reach the model through the same mechanism.
Let’s talk about your transformation
Tell us which work repeats every week. We will tell you honestly whether it is worth automating.
How we start
- A free first callWe pin down the problem and the goal together.
- A 2-week discovery sprintWe look at the data, the process and the tools, and decide where to start.
- A written proposalScope, architecture and timeline, in writing.