Glossary

ConceptAgents & Tool Use

Tool Calling (Function Calling)

At a glance

The model emits a structured call to a function you defined, and you run it.

Who this is for
Engineers and technical readers learning the terms used in AI systems.
Topics
  • Agents & Tool Use
  • Concept

In short

Tool calling, also called function calling, is how a language model asks your code to run a function you defined: the model returns the name and arguments as structured data, and your application checks and runs it. Bigcircle treats every call as untrusted input and enforces permissions, disclosures and approvals in the tool contract, because a sentence in a system prompt can be overridden by any text the model reads. MCP authorization covers where that check has to sit.

Key facts

Definition

You publish a name, a description and a JSON Schema for each tool, the model proposes a call, and your application is the only component that executes it.

How Bigcircle does it

  1. On Solarpunk, Bigcircle found that listing every tool in the prompt worked until roughly 30 tools, then had the model query a registry and choose among a handful, which took the product past 100 registered tools.
  2. On AVOX, every tool validated its arguments, checked the caller's permissions and enforced required disclosures, so a payment could not run until its disclosure had been given.
  3. Turn on strict mode for any tool that changes state, return errors as results the model can correct, and bound the retries so a broken vendor does not keep the agent busy.

Comparison

Tool calling produces a request to act and structured output produces a final answer in a schema, so forcing a fake tool to get JSON is the wrong feature, and Claude Opus 5.5 rejects forced tool use with a 400 error.

Tool calling, which OpenAI calls function calling, is how a language model asks your code to do something: look up an order, search a knowledge base, file a ticket, send an email. You describe the tools available. The model reads the request, decides a tool applies, and returns the tool's name and its arguments as structured data instead of prose. Your application checks that request, runs the real function, and hands the result back, and the model continues with it in context. Every production AI agent is this exchange repeated in a loop.

The model never executes anything. Its output is a request to call a tool and never itself an action. That rule shaped the tool layer we built for AVOX, an insurance voice agent, and the rest of this page depends on it.

A tool is a typed contract#

Each tool is described to the model by a name, a plain-language description and a JSON Schema for its inputs. A get_order tool might require an order_id string and accept an optional include_items flag. On Solarpunk, the desktop chief-of-staff agent we built, every tool is a typed contract with declared inputs, declared outputs and declared side effects. That makes the set of actions the agent can take a list you can read, so the limits on what it may do are enforced by the system rather than requested in a prompt.

The schema says what a valid call looks like. It cannot say when to call the tool or which combinations of arguments make sense. The description does that, and the model reasons over it when choosing, so write it the way you would brief a new engineer: what the tool does, when to use it and when not to, and what each argument means.

As of October 2026, both major APIs can enforce the schema while the model writes. OpenAI's guide says "We recommend always enabling strict mode." Anthropic's strict: true on a tool definition guarantees the arguments match, with a limit of 20 strict tools per request. Turn it on for any tool whose arguments reach a system that changes state.

The round trip#

You ask "where is order 4471?" The model cannot know that, but it sees get_order, so it returns a tool call: on Claude, a response with stop_reason: "tool_use" and a tool_use block; on OpenAI's Responses API, an output item of type function_call. Your code validates the arguments, runs the lookup, and sends the output back as a tool result. The model then writes the answer or asks for another call.

ModelYour application1. tool call: get_order(order_id: "4471")2. validate, authorize,run the real function3. tool result: status "shipped"4. model reads the result, then answers or calls another toolThe model only ever emits structured JSON. Your code runs everything.

Send failures back as results too. "Unknown order id, did you mean 4417?" lets the model correct itself on the next turn, and a crash strands the conversation. Bound the retries, though. On Solarpunk, an agent that retries indefinitely against a broken vendor was worse than one that stops, because it burns cost and time while looking busy.

Models can request several independent calls in one turn. Run them concurrently and return the results together, so the wait is the slowest call rather than the sum. Keep dependent or destructive calls one at a time: OpenAI's parallel_tool_calls: false and Claude's disable_parallel_tool_use exist for that.

One provider change catches teams who used tools to get JSON. Claude Opus 5.5 rejects forced tool use: tool_choice set to any or to a named tool returns a 400 error. If you defined a fake tool and forced it to get a clean object out of the model, move that schema to structured output, which is the feature that job needed.

Tool selection breaks before the context fills#

Teams usually worry about the token cost of a long tool list. On Solarpunk, putting every tool in the system prompt worked until roughly 30 tools, and then the model began choosing plausible but wrong tools with nothing in the output to show it. The context cost was the visible symptom and the wrong choice was the expensive one. OpenAI's own guidance is to aim for fewer than 20 functions at the start of a turn, which it calls a soft suggestion.

We changed the design so the model does not get the whole registry, the list of every registered tool. It queries that list, and chooses among a handful of relevant contracts instead of a hundred competing ones, which took the same product past 100 registered tools. Both major APIs now offer a tool search of their own. Where that point falls depends on the set: tools that overlap confuse a model sooner than tools that are clearly distinct.

Authorize every call in code#

A tool call is untrusted input. The model can be steered by any text it reads, including text an attacker planted in a page, a document or an email, which is how prompt injection turns an inbox tool into a way to forward confidential mail. So the checks belong in code, on every call.

Check arguments against the schema and the business rules on the server. Enforce permissions with the end user's identity, never with a line in the system prompt. On Skionis, the DevOps agent we built on a live AWS account, the only actions available are purpose-built tools wrapping the provider's APIs, with no general shell and no path by which a plan step becomes an arbitrary API call. On Solarpunk, credentials are added by the code that calls the vendor, at the moment it runs, and never enter the prompt, so the agent drives a session without ever learning a password. On AVOX, required disclosures sat in the tool contract: a payment could not run until its disclosure had been given. Gate anything irreversible behind a person, and log every call with its arguments and result. Our guide to AI SRE agents applies the same limits to an agent that answers production alerts: scoped tools, and a person approves before anything in production changes.

Where MCP fits#

Tool calling is a feature of each model API. The Model Context Protocol standardises how tools are packaged and discovered, so one server can offer its tools to any compatible client. Underneath, the model still emits the same kind of call, and your code still decides whether it runs. Our guide on MCP tool design covers how to shape the tools a server exposes, and MCP authorization covers where the permission check has to sit. A procedure can live in a skill the host loads into context while the MCP server keeps the access; our guide to skills vs MCP covers where each belongs.

Common questions about tool calling

  • What is tool calling in LLMs?

    A model returning the name of a function you described and the arguments to call it with, instead of prose. Your code validates and runs the function, and the result goes back into the conversation for the model to use.

  • How many tools can an agent use?

    OpenAI suggests fewer than 20 functions at the start of a turn as a soft rule. On Solarpunk, selection went wrong at roughly 30 tools in the prompt, and letting the model search a registry instead took the same product past 100.

  • What is the difference between tool calling and MCP?

    Tool calling is a feature of each model API. MCP standardises how tools are packaged and discovered so one server can serve many clients, and the model still emits the same kind of call underneath.

Let's build something that ships.

Tell us what you're building. We'll tell you whether it needs a fixed-scope build, a prototype taken to production, or a programme we run, what's achievable, and where the real bottlenecks are.

Reply within 2h

We store your name, email, company, and message, and email a copy to hello@bigcircle.ai. Read the privacy page and the terms.