Skip to main content
Early access — new tools and guides added regularly
Practical

Tool Use (Function Calling)

Last reviewed: April 2026

The ability of an AI model to interact with external tools — search engines, code interpreters, APIs, databases — to take actions beyond generating text.

Tool use (also called function calling) is the ability of an AI model to interact with external systems — not just generate text, but actually do things. Search the web. Run code. Read files. Query databases. Send emails. Call APIs.

Why tool use changes everything

Without tools, AI is a text generator. You type a question, it predicts an answer based on training data. Useful, but limited.

With tools, AI becomes an actor. Ask it to "find the cheapest flight from London to New York next Tuesday" and it can actually search flight APIs, compare prices, and present real results — not just generate a plausible-sounding answer from training data.

This is the bridge between AI assistants (chat) and AI agents (autonomous action).

How tool use works

  1. The model receives a prompt that includes descriptions of available tools (search, code execution, file access, etc.)
  2. The model decides whether a tool would help answer the question
  3. The model generates a structured tool call (which tool, with what parameters)
  4. The system executes the tool call and returns the result to the model
  5. The model incorporates the result into its response

This all happens automatically — the user just sees a natural-language response that happens to include real, current information.

Common tools

  • Web search: Access current information beyond training data
  • Code interpreter: Run Python/JavaScript, analyse data, generate charts
  • File access: Read and write documents, spreadsheets, code files
  • API calls: Interact with external services (CRM, email, calendar, databases)
  • Image generation: Create images from text descriptions
  • Browser: Navigate web pages and extract information

In practice

When you ask Claude Code to "read all the TypeScript files in this project and find any functions that are never called," it uses tool use to: read the directory listing (tool), read each file (tool), analyse the code (reasoning), and report findings (text). The tools are what make this possible — without them, the model could only guess based on training data.

Key consideration: More tools means more capability but also more risk. Each tool the AI can access is a tool it can misuse. This is why permission systems and human-in-the-loop gates matter — they control which tools the AI can use and when it needs approval.

Want to go deeper?
This topic is covered in our Advanced level. Unlock all 52 lessons free.

Why This Matters

Tool use is what transforms AI from a conversation partner into a productivity tool. Understanding which tools an AI has access to — and which it should have access to — is essential for both evaluating AI products and building your own AI workflows. Every time you see an AI tool claim to "actually do things," tool use is the mechanism making it possible.

Related Terms

Learn More

Continue learning in Advanced

This topic is covered in our lesson: From Chat to Agent: The AI Capability Spectrum