---
title: "What Is Tool Calling?"
description: "Tool calling is when an AI model outputs structured JSON to ask your code to run a function, so it can act and use tools instead of only replying with text."
type: "glossary"
locale: "en"
term: "Tool Calling"
canonical: "https://agenticschool.dev/glossary/tool-calling"
dateModified: "2026-06-13"
---

# What Is Tool Calling?

- Definition: Tool Calling
- Updated: 2026-06-13
- Keywords: tool calling, what is tool calling, function calling, llm tool calling, function calling vs tool calling
- Canonical URL: https://agenticschool.dev/glossary/tool-calling
- Locale: en

> Tool calling is when an AI model outputs structured JSON to ask your code to run a function, so it can act and use tools instead of only replying with text.

Tool calling, also known as function calling, is when an AI model produces structured output (usually JSON) that asks your program to run a specific function, instead of just replying with text. The model does not run the function itself; it picks which tool to use, fills in the arguments in a format that matches a schema you defined, and your code executes it and feeds the result back. Tool calling is the core mechanism that turns a chatbot into an agent: it is how a model fetches live data, runs code, queries a database or sends an email.

## How tool calling works

You give the model a list of tools, each described by a JSON schema: the tool name, what it does, and the parameters it accepts with their types. When the model decides a tool is needed, it returns a structured call with the chosen tool and arguments. Your runtime parses that, executes the real function, and returns the output to the model so it can continue, perhaps calling more tools, until it can answer.

- You define tools as JSON schemas: name, description, typed parameters.
- The model returns a structured call (tool name plus arguments), not free text.
- Your code runs the function and feeds the result back to the model.

## Why it matters

Tool calling bridges probabilistic reasoning and deterministic execution. The model is good at deciding what to do; your code is good at reliably doing it. By forcing the model to output a structured call that matches a schema, you get dependable, machine-readable actions instead of hoping it formats a request correctly in prose. This is the foundation under AI agents and under standards like MCP, which expose tools over a shared protocol.

## Tool calling and MCP

Tool calling is the local mechanism: tools defined for one model in one app. MCP (Model Context Protocol) standardises it across the ecosystem, so an MCP server can offer tools that any MCP-aware client can call without custom wiring. Put simply, tool calling is the verb, and MCP is one widely adopted way to make those tools reusable everywhere.

## FAQ

### What is the difference between tool calling and function calling?

They are the same thing. "Function calling" was the original term; "tool calling" is the more common name now because the functions are often called tools. Both mean the model emits a structured call your code then executes.

### Does the AI model run the function itself?

No. The model only decides which tool to call and produces the arguments as structured JSON. Your own code (or the agent harness) actually runs the function and returns the result to the model.

### How does the model know what tools are available?

You provide each tool as a JSON schema: its name, a description of what it does, and the typed parameters it accepts. The model reads those definitions and chooses the right tool with valid arguments.

### Why use tool calling instead of plain text?

Because it is reliable and machine-readable. A structured call that matches a schema can be executed directly, which is far safer than parsing an action out of free-form prose. It is what lets agents act on the world consistently.
