Choosing the Right Tool
An AI agent equipped with ten tools is not automatically ten times more useful than one with a single tool. The value of a large toolbox depends on the agent's ability to pick the right tool for each job. Grabbing a hammer when you need a screwdriver does not get the screw in — it damages the wall. The same logic applies to agents: choosing the wrong tool wastes time, produces wrong answers, or causes unintended side effects.
Tool Descriptions: The Agent's Instruction Manual
When an agent is given access to a set of tools, each tool comes with a description — a short explanation of what the tool does, what inputs it needs, and when to use it. This description is part of the agent's context, just like the user's message. The agent reads the description and uses it to reason about which tool fits the current task. A good tool description is specific, not vague. Compare these two: Bad: search — searches for things. Good: web_search — submits a text query to a live search index and returns up to five current web page titles, URLs, and text snippets. Use when you need recent information not available from training data. The good description tells the agent exactly what the tool covers and when to reach for it. Agents pick tools by matching task requirements against tool descriptions.
The quality of a tool's description directly affects how well an agent uses it. Vague descriptions lead to wrong tool choices. Specific descriptions with clear use-case guidance produce much better decisions.
The Matching Process: Task to Tool
When an agent faces a task, it runs through an informal matching process: First, what does this task actually require? Is it live information, exact math, a file operation, a calendar check, or something else? Second, which tool description best matches that requirement? If the task needs live information, the search tool wins. If it needs exact computation, the calculator wins. Third, do I have all the required inputs for that tool? If the search tool needs a query string, the agent must form one. If the calendar tool needs a date, the agent checks whether the user provided one. Fourth, is this a reading task or a doing task? If it is a doing task, the agent should confirm before calling. This process is not a rigid checklist — agents learn to run through it fluidly based on the task and the available tools.
When No Tool Fits — and When Multiple Tools Are Needed
Sometimes none of the available tools exactly match the task. A good agent recognizes this and either tells the user honestly, or tries to combine tools in a sequence. For example, to answer How many days until the next full moon? an agent might use a calendar tool to get today's date, then a search tool to find the next full moon date, then a calculator tool to compute the difference. Chaining tools in sequence is a skill. Each tool call's output becomes input for the next reasoning step. The agent must track what it has learned so far and decide whether it has enough to answer, or whether another tool call is needed.
Chaining tools means using the output of one tool call as input to the next — building up a complete answer through several coordinated steps rather than a single lookup.
Match each task to the best tool choice and the key reason for that choice.
Terms
Definitions
Drag terms onto their definitions, or click a term then click a definition to match.
An agent has access to three tools: web_search, calculator, and get_current_date. A user asks: 'How many days have passed since January 1, 2020?' What is the correct sequence of tool calls?
Why does a vague tool description like 'search — searches for things' lead to poor agent performance?
Write Better Tool Descriptions
- Step 1: Below are three vague tool descriptions. Rewrite each one to be specific, actionable, and helpful to an agent making a tool-selection decision.
- A) file_reader — reads files.
- B) translator — translates.
- C) news_tool — gets news.
- Step 2: For each rewritten description, add one sentence explaining when an agent SHOULD use this tool and one sentence explaining when it should NOT.
- Step 3: Design one new tool of your own for a task an AI agent might need. Write its name, its complete description, its required input fields, and a sample output.
- Step 4: Trade your tool design with a classmate. Can they figure out when to use it from the description alone?