Designing tools agents can choose correctly: 5 principles and 3 common pitfalls
An agent choosing the wrong tool often points to unclear descriptions. This article explains what drives tool selection and how to identify the right answer in scenario questions.
A recurring Tools & MCP scenario is an agent with several tools that keeps choosing the wrong one. Suggested fixes often include fine-tuning the model, increasing max_tokens, merging tools or rewriting descriptions. To choose the right fix, understand what information the model uses.
How does the model choose a tool?
On each call, Claude receives a list of tools with name, description and input_schema. The model cannot know what a tool does beyond what is written there. If two tools have similar descriptions, the model has to guess.
When an agent chooses the wrong tool, review the descriptions first, before considering more expensive solutions.
5 principles for writing descriptions
- 1Describe the tool in one specific sentence“Get one order by its exact ID” is clearer than “handle orders”.
- 2State when to use itDescribe the signals in a user request that make this tool the right choice.
- 3State when not to use itPoint to another tool for similar cases. This is often the missing part.
- 4Use a precise input schemaClear types, required fields and enums for fixed choices reduce invalid calls.
- 5Return recovery guidance with errorsExplain what is missing and the next step so the agent can recover instead of retrying blindly.
Example: before and after
The revised description says when to use the tool, when not to use it and which alternative to choose. This is the information the model needs to distinguish them.
3 common pitfalls
Try a scenario question
A support agent often calls search_orders when users give an exact order ID. What is the most appropriate first fix?
Summary
- The model chooses tools using name, description and input_schema.
- Descriptions should say when to use a tool and when not to use it.
- Wrong tool selection → improve descriptions before considering expensive solutions.
- Avoid overlapping tools and universal tools with free-form inputs.