Tool Use
Definition
Tool use is the general capability of LLMs to interact with external systems beyond their training knowledge. While function calling refers to a specific API mechanism, tool use encompasses the full breadth of actions an LLM can take: web search (retrieve current information), code execution (run Python in a sandbox), file read/write, API calls, database queries, image generation, web browsing, email/calendar access, and more. Tool use is the foundation of AI agents—systems where the LLM autonomously selects and uses tools to complete multi-step tasks. Major AI agent frameworks (LangChain, LlamaIndex, Anthropic Computer Use) are essentially tool-use orchestration systems that manage the LLM-tool interaction loop.
Why It Matters
Tool use is what distinguishes AI agents from AI assistants. An assistant answers questions from static knowledge; an agent uses tools to gather real-time information, take actions, and accomplish goals in the world. For 99helpers customers, tool use enables chatbots to go beyond answering pre-written FAQs to actively looking up account information, creating records, processing requests, and routing to the right teams. The quality of tool use—how reliably the LLM selects the right tool, constructs valid arguments, and interprets results—is a major dimension of LLM capability that varies significantly across models.
How It Works
Tool use in practice requires: (1) tool definition—describe each tool with name, description, and input schema; (2) tool selection—the LLM reasons about which tool(s) to call to address the user's request; (3) argument construction—the LLM generates JSON-formatted arguments for the selected tool; (4) execution—the application runs the tool and captures the result; (5) result integration—the LLM incorporates the tool result into its reasoning; (6) iteration—the LLM may call additional tools if needed. The ReAct (Reasoning + Acting) framework formalizes this as: Thought → Action (tool call) → Observation (result) → Thought → ... → Final Answer. Modern models like Claude 3.5 Sonnet and GPT-4o demonstrate sophisticated multi-tool reasoning.
Tool Use — LLM Decides, Tool Executes, LLM Synthesizes
User Message
What is the current price of AAPL stock?
LLM → Tool Call
get_stock_price({ symbol: "AAPL" })
Tool Result → returned to LLM
{ "symbol": "AAPL", "price": 214.72, "currency": "USD" }
LLM Final Response
Apple (AAPL) is currently trading at $214.72 USD. Prices update in real time during market hours.
Common tool categories
🔍
Search
web, knowledge base
🧮
Compute
calculators, code exec
📡
APIs
weather, stocks, CRM
💾
Storage
read/write databases
Real-World Example
A 99helpers automation uses tool use to handle the query 'Can you downgrade my account to the Starter plan and confirm the new pricing?': (1) get_account_info(user_id) → returns current plan (Pro); (2) get_plan_details(plan='Starter') → returns pricing and features; (3) model presents the details and asks for confirmation; (4) on user confirmation, update_subscription(user_id, plan='Starter') → returns success; (5) model confirms the downgrade with the new pricing. A three-tool, multi-step workflow completing in one conversation turn what previously required a support agent.
Common Mistakes
- ✕Not handling tool execution failures gracefully—tools can fail (API errors, network timeouts); the LLM must receive error information and respond accordingly.
- ✕Allowing unrestricted tool use without access controls—tools with write access should be restricted to authorized users and contexts.
- ✕Skipping tool result validation—a tool may return unexpected formats or erroneous data; validate results before passing them to the LLM.
Related Terms
Function Calling
Function calling enables LLMs to request the execution of predefined functions with structured arguments, allowing AI systems to interact with external APIs, databases, and tools rather than just generating text.
LLM Agent
An LLM agent is an AI system that uses a language model as its reasoning core, autonomously planning and executing multi-step tasks by calling tools, observing results, and iterating until the goal is achieved.
Structured Output
Structured output constrains LLM responses to follow a specific format—typically JSON with defined fields—enabling reliable parsing and integration with downstream systems rather than free-form text generation.
LLM API
An LLM API is a cloud service interface that provides programmatic access to large language models, allowing developers to send prompts and receive completions without managing model infrastructure.
Agentic RAG
Agentic RAG extends basic RAG with autonomous planning and multi-step reasoning, where the AI agent decides which sources to query, in what order, and whether additional retrieval steps are needed before generating a final answer.
Ready to build your AI chatbot?
Put these concepts into practice with 99helpers — no code required.
Start free trial →