Two tools that do similar things are the easiest tools to confuse: a search that finds documents and a search that finds orders, or a send that emails and a send that messages. The model picks between them from their descriptions, so the descriptions must say what makes each one different, not what makes them alike. Anthropic’s guidance is direct on this point: design toolsets and their documentation clearly and thoughtfully, because the model selects tools using their names and docstrings. Write each description with the difference first: what this tool does that the other one does not, and when to use this one instead of the other.
What you need
- Two or more similar tools the agent confuses, with their current descriptions
- One example of a wrong pick between them, with the task that caused it
- A sentence for each tool naming what makes it different from the others
Step 1: Write the difference into each description
Rewrite each tool’s description to start with what sets it apart: the data it touches, the action it takes, and the case it is for. A description that could describe the other tool is not finished.
Step 2: Add a when-to-use line naming the other tool
Add one line to each description saying when to use this tool instead of the other, such as use this for orders, not documents. The model needs the contrast spelled out, not implied.
Step 3: Test with the task that caused the wrong pick
Run the task that previously picked the wrong tool and confirm the model now picks the right one. If it still picks wrong, the difference is still not clear enough in the descriptions.
Worked example: synthetic similar-tool check
The table below is a synthetic example. It shows the expected result of distinguishing descriptions; no agent was run.
| Task | Tool picked | Correct? |
|---|---|---|
| Find the refund policy | search_docs | Yes |
| Find order A123 | lookup_order | Yes |
| Send a Slack message | send_slack | Yes |
| No wrong picks | Yes | Pass |
Expected result (UNTESTED). each task picks the right tool, with no wrong picks between the similar tools. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- Descriptions guide the pick, they do not force it: a determined model can still pick wrong.
- Two tools that truly do the same thing should be merged, not described apart.
- A description that is too long costs tokens on every call, so keep the contrast to one line.
- When a tool changes, its description must change with it, or the contrast goes stale.
