What Is Tool Calling?

Also called function calling, tool use

Short Answer

Tool calling, also called function calling, lets a language model ask your code to run a specific function, such as searching a database, getting the weather or creating a ticket. The model returns a structured request with the tool name and arguments; your code runs it and sends the result back.

  • Taught in lesson 114
  • In 2 real job ads
24.3%Part of a Skill Employers Ask For: AI Agents24.3% of technical job ads at AI companies ask for AI Agents, the skill this term belongs to (number 7 of the skills ai2hired tracks).Read the full skill guide: what employers expect, how deep to go and interview questions

Why It Matters

Tool calling is what lets a language model use real data and take real actions, such as looking up an order or creating a ticket. It is the mechanism under every agent, so AI engineers need to design tools well and handle their results safely.

How It Works

The model never runs the tool itself. Developers describe each tool with a name, a description and a schema of its arguments; the model decides when a tool is needed and fills in the arguments. OpenAI added function calling to its API in June 2023, and it is now standard across providers.

Tool calling is the building block of AI agents and of the Model Context Protocol. Good tool descriptions and strict validation of arguments are what make it reliable.

Good tools have clear names, precise descriptions of when to use them and strict argument schemas, because the model chooses tools from these descriptions. Your code must validate every argument before running anything, handle errors and return results the model can understand. Tools that change data deserve extra care: limit their permissions, log every call and require confirmation for actions that cannot be undone.

Tool Calling in Practice

Everyday Example

Asked "what is my order status?", the model calls get_order_status with the order number, your code queries the shop database, and the model writes the answer from the result.

Industry Example: Pharma

An assistant calls a tool that queries the laboratory information system for a batch's test results, instead of guessing them, and reports exactly what the system returned.

Where You Meet It

  • Agents that search, calculate or update systems.
  • Assistants that fetch live data such as prices or weather.
  • MCP servers that expose tools.
  • Model API features named function calling.

Key Ideas Around It

Function calling
Another name for tool calling.
Argument schema
The exact inputs a tool accepts.
Validation
Checking arguments before running a tool.
Tool result
The output returned to the model after a tool runs.

A Common Mix-Up

The model does not run tools itself. It only asks for a tool with arguments; your code decides whether and how to run it.

Check YourselfWho actually executes a tool call: the model or your code?

Your code. The model only returns the tool name and arguments; your application runs it and sends back the result.

Seen in Real Job Ads

Lines quoted word for word from live job postings.

  • Pfizer

    Senior Manager, LLMOps & AI Integration Engineer

    Hands‑on with GenAI/LLM ecosystems (e.g., tool/function calling, structured outputs, prompt orchestration) and RAG components (embeddings, retrievers, rerankers, vector stores).
  • Sanofi

    Digital R&D Staff Software Engineer, Hyderabad

    Understanding of agent memory models (short-term, long-term, episodic), tool use, and planning strategies (ReAct, Plan-and-Execute, etc.)

Learn It on ai2hired

S10 · #114Tool Calling From Scratch

Coming in Season 10, Agents and Tool Use. Every ai2hired lesson is free on YouTube.

Questions People Ask

Does the model run the tool?

No. It only produces a structured request. Your code decides whether to run it, runs it and returns the result.

What is a tool schema?

A description of a tool's inputs, usually in JSON Schema, so the model knows which arguments to send and in what format.

Learn AI From Zero to Hired

Free lessons on YouTube, each one built from what real AI job ads ask for.