Landmark 18 stops to get here · leads to 2

Tool Use

A language model asking the application around it to run a function, such as search, a calculator or an API, then using the result in its answer.

Your route here

18 stops · basics first
  1. Natural Language Processing ✓ understood

    The field of AI that lets computers read, interpret, translate and generate human language, from spam filters and search to chatbots.

  2. Token ✓ understood

    The unit of text a language model reads and writes: a word, part of a word, or a character, drawn from the model's fixed vocabulary.

  3. Tokenization ✓ understood

    Splitting text into tokens, usually subword pieces, and mapping each to an integer ID so a language model can process it.

  4. Language Modeling ✓ understood

    Assigning probabilities to sequences of text, in practice by predicting each next token from the ones before it; the objective behind large language models.

  5. Dataset ✓ understood

    A collection of data examples used for training, validating, or testing machine learning models.

  6. Training ✓ understood

    The process of fitting a model to data by repeatedly measuring how wrong its outputs are and adjusting its parameters to reduce that error.

  7. Machine Learning ✓ understood

    Building systems that learn patterns from data instead of following hand-written rules, getting better at a task as they see more examples.

  8. Unsupervised Learning ✓ understood

    Learning from unlabeled data to discover hidden patterns, structures, or relationships without explicit target outputs.

  9. Self-Supervised Learning ✓ understood

    Training on unlabeled data by making the data supply its own answers: hide or alter part of an input and have the model predict or match it.

  10. Pre-training ✓ understood

    Training a model on a large dataset (often self-supervised) before fine-tuning on specific tasks, enabling transfer learning.

  11. Feature ✓ understood

    A single measurable property of an example, such as a house's floor area or how many links an email contains, used as an input to a model.

  12. Neural Network ✓ understood

    A model built from layers of simple units, each taking a weighted sum of its inputs and applying a nonlinearity; training adjusts the weights so the whole stack maps inputs to useful outputs.

  13. Deep Learning ✓ understood

    A subset of machine learning that uses neural networks with multiple layers (deep neural networks) to learn hierarchical representations of data.

  14. Representation Learning ✓ understood

    Letting a model learn its own internal description of the data, such as embeddings or layered visual features, instead of relying on features designed by hand.

  15. Embedding ✓ understood

    A list of numbers (a vector) that represents a word, sentence, image or other item, learned so that similar items end up close together.

  16. Attention Mechanism ✓ understood

    A technique that lets a neural network weigh every part of its input when producing each output, focusing on the parts most relevant at that step.

  17. Transformer ✓ understood

    A neural network architecture, introduced in 2017, built from stacked self-attention and feed-forward layers; the basis of nearly every modern large language model.

  18. Large Language Model ✓ understood

    A neural network, almost always a transformer, trained on vast amounts of text to predict the next token, which lets it write, answer, summarize and follow instructions.

  19. Tool Use · you are here ✓ understood

Picture it

  1. 01 User asks a question "What's 17% of 2,340?"
  2. 02 Model emits a tool call Structured name + arguments, e.g. JSON
  3. 03 App runs the tool Calculator, search, code, API
  4. 04 Result returns to model Added to the context as a tool result
  5. 05 Model answers Grounded in the tool's output
Notice that the model doesn't run the tool itself: it only asks, your code executes, and the result is fed back into its context.

Tool use, also called function calling, lets a language model reach beyond text. The application tells the model which tools exist. When a request needs one, the model replies with a structured request (the tool’s name and its arguments) instead of an answer. The application runs the tool, sends back the result, and the model carries on with real data in hand.

It covers what models are bad at on their own. The Toolformer paper (Schick and colleagues, 2023) opens with the paradox: language models can pick up new tasks from a few examples, yet struggle with arithmetic and factual lookup, where far simpler systems excel. A calculator, a search engine or a database query closes that gap.

How a tool call works

The diagram is the whole protocol, and its key point is that the model never executes anything. Using Anthropic’s API as a concrete example:

  1. Define. Each tool has a name, a description and an input schema written in JSON Schema. The description is what the model reads to decide when the tool applies, so it matters as much as the code behind it.
  2. Request. When the model wants a tool, the response ends with stop_reason: "tool_use" and contains a tool_use block holding the arguments.
  3. Execute. Your code runs the function: a weather lookup, a SQL query, a file edit.
  4. Return. You send the output back in a tool_result block, and the model uses it to answer or to call another tool.

Some tools, such as web search, run on the provider’s side instead (“server tools” in Anthropic’s terms), but the shape of the exchange is the same.

From one call to an agent

Put steps 2 to 4 in a loop and let the model decide when it’s finished, and you have an AI agent. Retrieval-augmented generation fetches documents before every answer; with tools, looking something up becomes one choice among many that the model makes as it goes. Tool definitions and results all sit in the context window and cost tokens, which limits how many tools and how much output an agent can juggle. The Agentic Coding Harnesses course shows how coding agents wire this up.

The catch

A model can pick the wrong tool, misread a result, or fill in arguments it was never given: Anthropic’s docs note that when a required parameter is missing, some models ask for it while others may guess a plausible value. Tool results are also untrusted input, since a web page or file can contain text written to steer the model, so actions that delete data, send messages or spend money deserve a human confirmation step.

Where it sits

Tool Use

Explore nearby

In the research

All papers →

11 papers that build on Tool Use ; showing 5, canon first.

Canon · 2022 ReAct: Synergizing Reasoning and Acting in Language Models The think–act–observe loop in ReAct is the skeleton of nearly every LLM agent and coding harness today. Frontier · Dec 2025 · 671 citations DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models It shows an open model competing with the best closed ones on reasoning while getting cheaper to run. Frontier · Feb 2026 · 174 citations SkillsBench: Benchmarking How Well Agent Skills Work Across Diverse Tasks It is the first careful evidence that skills work, and that smaller models with good skills can match bigger ones. Frontier · Sep 2025 · 139 citations SimpleTIR: End-to-End Reinforcement Learning for Multi-Turn Tool-Integrated Reasoning A one-idea fix that makes multi-turn tool-using RL trainable. Frontier · Aug 2025 · 101 citations WebWatcher: Breaking New Frontier of Vision-Language Deep Research Agent Deep-research agents have been text-only; this extends them to the visual web.

Sources

  1. Anthropic, "Tool use with Claude" . Claude API documentation: client vs server tools, tool_use and tool_result blocks
  2. Schick et al., "Toolformer: Language Models Can Teach Themselves to Use Tools" . 2023