P

Tool Use: Definition and Examples

Tool Use (or function calling) is the ability of a language model to interact with external tools — APIs, databases, calculators, browsers — to accomplish tasks that go beyond simple text generation.

Full definition

Tool Use refers to the mechanism by which a large language model (LLM) can call external functions or services during a conversation. Instead of only producing text, the model identifies that a specific action is needed, formulates a structured call (usually in JSON) to the appropriate tool, and then integrates the result into its response.

Concretely, the developer defines a set of available tools with their parameters (name, description, JSON schema). When the user asks a question, the model decides whether to use a tool, which one to choose, and what arguments to pass. The application then executes the call and returns the result to the model, which interprets it to formulate a natural response.

This approach solves several fundamental limitations of LLMs: the lack of real-time data, the inability to perform reliable calculations, and the impossibility of acting on external systems. Thanks to Tool Use, an assistant can check the weather, book a flight, query a database, or execute code — all while maintaining a fluid conversation.

Tool Use is at the heart of the transition from chatbots to AI agents. It is what enables a model to go from "I can talk about it" to "I can do it". Major providers (Anthropic, OpenAI, Google) all offer native implementations of this feature, with variations in syntax but an identical principle.

Etymology

The term "Tool Use" is borrowed from cognitive science and primatology, where it refers to an organism's ability to use an external object to achieve a goal. Applied to AI, it was popularized in 2023-2024 with the rise of function calling APIs. Anthropic uses the term "Tool Use", while OpenAI initially preferred "Function Calling" before converging to similar terminology.

Concrete examples

Real-time information retrieval

What is the weather in Paris today? (The model calls a weather tool with {"location": "Paris, FR"} and integrates the current data into its response)

Complex and reliable calculations

Calculate the monthly payment for a loan of €250,000 over 20 years at 3.5%. (The model calls a calculator function rather than attempting an approximate mental calculation)

Interaction with a business database

How many orders were placed this week by premium customers? (The model generates an SQL query via a query_database tool and presents the results)

Practical usage

To leverage Tool Use in prompt engineering, describe each tool with a clear description and well-typed parameters — the quality of descriptions directly influences the model's ability to choose the right tool. Use explicit names (get_weather rather than tool_1) and provide example values in parameter descriptions. Remember to handle error cases: indicate to the model how to react if a tool fails or returns an unexpected result.

Related concepts

Function CallingAI AgentAPIRAG (Retrieval-Augmented Generation)MCP (Model Context Protocol)JSON SchemaOrchestration

FAQ

What is the difference between Tool Use and Function Calling?
They are essentially synonyms. "Function Calling" is the term historically used by OpenAI, while Anthropic and others prefer "Tool Use". The concept is identical: allowing the model to call external functions in a structured way. The current trend is converging towards "Tool Use" as the generic term.
Does the model directly execute the tools?
No. The model only generates a structured request (a JSON describing the tool to call and its parameters). It is the developer's application that actually executes the call, then returns the result to the model. This separation is essential for security: the developer maintains full control over what is executed.
How many tools can be provided to a model at once?
Recent models like Claude support dozens of tools simultaneously. However, the more tools there are, the more context the model must process to choose the right one, which can affect accuracy and latency. In practice, it is recommended to provide only the tools relevant to the use case, and to group tools by category with precise descriptions.

See also

How to use this prompt

  1. Copy the prompt with the button above.
  2. Paste it into ChatGPT, Claude or your favorite AI assistant.
  3. Replace the bracketed variables with your details, then refine the result.

About Prompt Guide

Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.

More definitions

Get new prompts every week

Join our newsletter.