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
FAQ
What is the difference between Tool Use and Function Calling?
Does the model directly execute the tools?
How many tools can be provided to a model at once?
See also
How to use this prompt
- Copy the prompt with the button above.
- Paste it into ChatGPT, Claude or your favorite AI assistant.
- 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
Transformer: Definition and Examples
Neural network architecture introduced in 2017 by Google, based on the attention mechanism, which forms the basis of all major language models.
Trustworthy AI: Definition and Examples
Trustworthy AI refers to artificial intelligence designed to be reliable, ethical, transparent, and respectful of fundamental rights.
Video Understanding: Definition and Examples
Ability of an AI model to analyze, interpret, and extract relevant information from video content, combining visual, temporal, and often audio understanding.
Vision RAG: Definition and Examples
Vision RAG is an extension of Retrieval-Augmented Generation that integrates visual documents (images, charts, scanned PDFs) into the search process.
World Model: Definition and Examples
A world model is an internal representation that an AI system builds of the external world, allowing it to simulate, predict, and reason about the consequences of its actions without having to execute them in reality.
Zero-Shot Prompting: Definition and Examples
Zero-shot prompting gives the AI an instruction without any examples. Discover when and how to use this technique.
Get new prompts every week
Join our newsletter.