Write tool descriptions Claude can route by
Rewrite overlapping tool descriptions so each states its purpose, inputs, outputs, edge cases and when to use it instead of its neighbour, and judge a tool set and system prompt for the wording that causes misrouting.
Scenario
Your Multi-Agent Research System writes market reports. Trace review of 200 runs shows the document analysis subagent calling fetch_document with ids like corpus-4812 in 31 of them. Those ids belong to your licensed report library, so the fetch fails or returns a login page, and the final report cites a source nobody read.
The subagent also has read_report. Here are both descriptions, in full:
fetch_document: Fetches a document and returns its text.
read_report: Reads a report and returns its contents.
Claude did not misbehave. It was handed two tools that say the same thing.
Explanation
The description is how Claude chooses. When an agent picks a tool, it reads each tool's name, description and input schema. Anthropic's tool docs call detailed descriptions "by far the most important factor in tool performance". A one-line description leaves Claude to guess, and two one-liners that sound alike make it guess between them.
A description Claude can route by covers, in three or four sentences or more:
- Purpose: what the tool does, in terms of the task, not the implementation.
- Inputs: what each parameter means and its format, with an example value (
corpus-4812,https://...). - Outputs: what comes back, and what does not (no tables, first 20 pages only).
- Edge cases: what happens on a miss, a paywall, an empty result.
- Boundary: when to use it, and which tool to use instead for the neighbouring case.
Fix overlap at the source. When two tools could both answer the same request:
- Rename so the name carries the difference. Prefixing by service or resource (
corpus_get_report,web_fetch_page) makes the boundary visible before Claude reads a word of description. - Split a generic tool that hides several jobs. A single
analyzetool that summarizes, extracts figures and checks quotes has three input and output contracts behind one name; three purpose-specific tools give each its own. - The opposite mistake exists too: the docs advise grouping closely related operations on one resource (create, review, merge a pull request) behind an
actionparameter rather than one tool per verb. The test is the same either way: from the name and description alone, can Claude tell which tool a request needs?
Check the system prompt as well. Instructions keyed to a word, such as "if the user mentions a report, use read_report", create a tool association that can override a good description. "Market report on EV charging" from the web now goes to the library tool. Describe the intent ("for documents in our licensed library"), not a trigger word.
The new-hire test. Read only the names and descriptions, as a new colleague would. If you can't say which tool handles "the PDF at this URL", Claude can't either.
Worked example
Before: the two descriptions from the hook, plus this line in the subagent's system prompt:
When a finding refers to a report, read it with read_report.
After: renamed, differentiated, and the keyword rule replaced.
corpus_get_report: Returns the full text of one report from our licensed research library (Gartner, IDC and in-house studies). Input: report_id, a library id such as "corpus-4812", as listed by corpus_search. Returns the text with page markers; tables come back as plain text. Returns NOT_FOUND for an unknown id. Use web_fetch_page instead for anything addressed by a URL.
web_fetch_page: Downloads one public web page or PDF and returns its readable text. Input: url, a full https:// address taken from search results. Returns at most the first 40 pages of a PDF, and an error for pages behind a login. Do not use it for library ids such as "corpus-4812": use corpus_get_report.
System prompt: To read a source, use the tool that matches how it is identified: library ids go to corpus_get_report, URLs go to web_fetch_page.
What changed:
- Names now say where the document lives, so the choice starts before the description.
- Inputs have formats and examples, the one fact that separates the two tools.
- Each boundary points at the other tool, both ways.
- The system prompt routes by how a source is identified, not by the word "report".