Blog / How to optimise your MCP tools by knowing how agents call them

Name MCP tools the way users talk: how names-only, regex and BM25 search pick tools

Before an agent calls your tool, it has to find it among dozens or hundreds. Each agent app searches differently, but in all three we captured, your tool's name did most of the work.

Leonid Bugaev · Published 21 Oct 2026

Three ways apps find tools

We captured the traffic of three agent apps with the same 99-tool MCP server attached and the same request.

AppWhat the model getsHow it searched
Claude Code 2.1.301113 tool names, no descriptionsToolSearch with select: and 3 exact names
Codex 0.161.0No tool names at all; a code tool with ALL_TOOLSJS regex over name and description: server name first, then narrower filters
Grok Build 1.0.60Server names and tool countssearch_tool with the user's words plus the server name; client-side BM25

All three found the right tool. Details: Claude Code tool search, how Codex finds MCP tools, OpenCode and Grok Build.

Find out whether agents find your tools.

We run your users' requests, in their words, through the agent apps they use and show which tools get found, missed or confused.

Test your MCP

What names do in each

When the user doesn't name your product, all three rely on guessed words. In live runs Codex missed the server's tools in 8 of 80 (5–19%). See when the agent doesn't recognise your server.

Naming rules

  1. Use the user's nouns: if the screen says “tasks”, don't call them items. If you must, say “tasks are called items in the API” in the description.
  2. Verb + object: list_tasks, get_task, count_tasks_by_status. The action matters to the model's choice.
  3. One obvious tool per job. Two tools that both look like the answer split the choice. See why agents call the wrong tool.
  4. Consistent prefix for a domain (billing_, projects_) so a filter or select can grab the set.
  5. A server name users would type, because apps prefix it and searches start from it.
  6. Repeat the key words in the first line of the description for regex and BM25. See put the meaning in the first line.

Examples

Weak             Better
stats            get_task_counts
workspace        get_workspace_overview
ar_docs_query    list_invoices
do_action        start_export   (destructive, say so)

Go deeper: UI words vs API values, How many MCP tools is too many, How to optimise your MCP tools.

How we measured

FAQ

How should I name MCP tools so agents find them?

Use the words your users use for the object and the action (list_invoices, get_invoice), keep a consistent prefix or namespace, and avoid internal codenames. In our captures Claude Code picked tools from names alone, and Codex and Grok Build matched names and descriptions against words.

Does the tool description matter for discovery?

In Codex and Grok Build, yes: their search covers descriptions too. In Claude Code, the model chose from names before seeing any description. Put the key words in both.

Should tool names include the product name?

Agent apps already prefix MCP tools with the server name (for example mcp__server__tool), and Codex's first filter in our capture was the server name. Pick a server name users would type.

What's BM25 tool search?

A keyword-ranking method: tools whose names and descriptions share more of the query's words rank higher. Grok Build runs it on the client with a default limit of 5.

Find out whether agents find your tools.

We run your users' requests, in their words, through the agent apps they use and show which tools get found, missed or confused.

Test your MCP