MCP tool search · 3 of 3

Making MCP tools findable across AI clients

Anthropic had this documented, others did not. Not in a way that was helpful at all. So I wanted to make sure how it works, so that I could improve toolmenu.

Which approach is right?

If I were building a client, I'd pick keyword search, BM25 or similar, and I'd publish exactly what it reads and how many results it returns. Not because keywords are smarter: they aren't. Search for "find organizations" and a tool called list_orgs doesn't come up. Embeddings or letting the model choose, as Gemini does, could handle that better.

I'd pick keywords because a server author can reason about them. If I know the search reads the name, the description and the argument names, and returns 8, I can write for that and test it. With embeddings, the ranking depends on a model I can't see, and it can change when the vendor updates that model. I saw that even without embeddings: OpenAI's hosted search wanted the exact phrase on gpt-5.4 and accepted the words in any order on gpt-6.2-astra. Same API, same tools, different results, and nothing in the docs said so.

Letting the model browse names is the most capable approach. It's also the one that leans hardest on naming and costs context for every tool listed. That's fine for 20 tools and gets harder at 200.

A checklist for any client

The checklist isn't a workaround for bad search. It's what still works whichever way the client selects tools:

What I'd ask of clients is simple: document the fields, the method and the result count, the way Anthropic did. Which method you pick matters less than whether server authors can know it.

What changed in toolmenu

Three things, all in 0.30.0.

1. It ranks for Codex, not just Claude. Codex's search isn't documented, but its source is public. It uses BM25 over a tool's name, title, description and top-level argument names, skips argument descriptions, and returns 8 results by default. The Claude API returns 5 by default and does read argument descriptions. --client codex now builds Codex's index and uses its count of 8, so toolmenu's "findable" check means being in that client's default results, by that client's rules, not the Claude API's.

2. It checks several clients at once. With --client claude-api-search,codex you get each client's findings in one run, and a new check, search/client-difference, lists tools that one client's search returns for their own name, in a single search at its default result count, and the other's doesn't. That's the find_organizations case from the simulated rankings: in toolmenu's simulations, Codex's top 8 includes it and the Claude API's top 5 doesn't.

3. It ranks across servers, not one at a time. An agent searches every connected server's tools together, so toolmenu scan now pools them and searches for each tool by its own name. The four server menus contain 244 tools in total; toolmenu's scan reported 243 pooled tools. In the simulation, when Atlassian, GitHub, Sentry and Azure DevOps are pooled, 8 tools that rank in the Claude API's top 5 when searched against their own server fall outside its top 5. GitHub's list_issues ranks 4th on its own and 23rd with the others. None fall outside Codex's top 8. That's the new search/outranked check. It's a warning when you've written down which query should find which tool (scan --routes).

The cross-server numbers are one set of four servers. They show that pooling pushes tools out of the top results, not how often it happens across all servers.

What didn't change, and why. I measured OpenAI's hosted tool search and Gemini's Tool Retrieval too, as described in the article on simulated rankings and measured API calls. Neither documents how it works, and toolmenu only builds a client profile from a client's own docs or source. So those measurements are in the bench data, not in a rule. --client openai still checks OpenAI's documented limits, but it doesn't rank.

Try it

Run it on your own server, with both clients:

npx toolmenu@0.30.0 snapshot --client claude-api-search,codex --out menu-before.json -- <your server's start command>

For an HTTP server, pass its URL in place of -- <command>.

I ran it on a server with over 100 tools I maintain. For their own names, 8 tools fell outside the Claude API simulation's top 5 and 2 outside Codex's top 8; 6 fell outside the Claude API's top 5 but inside Codex's top 8.

I tried the checklist's first item on one of them, a create tool: I put the words for what it does at the start of its description (+9 tokens), ran it again, and compared the two menus:

npx toolmenu@0.30.0 snapshot --client claude-api-search,codex --out menu-after.json -- <same command>npx toolmenu@0.30.0 diff menu-before.json menu-after.json

In the Codex simulation, it moved from 4th to 2nd. In the Claude API simulation, it stayed 7th, behind the same six tools. One change, two clients, two outcomes. Why it didn't move in the Claude API simulation is something I haven't tested.

one create tool, before and after one description change

Codex simulationtop 8 by default
Claude API simulationtop 5 by default

If toolmenu flags something you think is wrong, or misses something it should catch, open an issue: https://github.com/niksa90/toolmenu/issues

Sources

copy for AI · more from niksa →