Once an agent has more than a few dozen tools, most clients stop sending every tool's full definition to the model. They defer tools: the model gets something small up front and pulls in full definitions when it needs them. How the right tool gets found is where they differ, and there are four families:
- Keyword ranking: a search over tool text, best matches first. Claude API (BM25 variant), Codex, OpenAI hosted search (measured).
- Pattern match: the model writes a regular expression over tool text. Claude API (regex variant).
- Embeddings: the query and each tool are compared as vectors, by meaning. GitHub Copilot in VS Code, for Claude models, with its own client-side search.
- Model-driven browsing: no ranking. The model sees names, or a folder of tool files, and picks or reads them. Cursor, Antigravity, Kiro (V3), Gemini API (measured).
xAI Grok's remote MCP doesn't defer: it sends every tool's full definition every time. Gemini CLI's deferral behaviour isn't documented.
The practical consequence for anyone writing an MCP server: the same tool can make it into one client's tool selection and be absent from another's. With keyword search, a user's words have to appear in your tool's name or description ("purchases" finds nothing if your tools only say "orders"). With embeddings, meaning is enough. With model-driven browsing, the tool's name and the server's description carry almost all the weight.
Client by client
Each fact below says how I know it: docs (the vendor's own documentation), source (the client's published code, at a commit), or measured (my own API calls, 19 November 2026). Where nobody says, it says "not stated".
| Client | Deferred by default? | How it matches | Fields searched | Results per search |
|---|---|---|---|---|
| Claude API | no: you mark defer_loading: true | BM25 or regex (Python re.search, case-insensitive) | name, description, argument names, argument descriptions | 5 by default; the model can ask for 1 to 10,000 |
| Claude Code | yes, all MCP tools | not stated which variant | not stated | not stated |
OpenAI hosted tool_search | no: you mark functions or a whole MCP server | keyword match inside the namespace the model picks (measured) | name and description, not arguments (measured) | gpt-5.4: every match; gpt-6.2-astra: at most 8 (measured) |
| Codex (source) | yes, all MCP tools | BM25 (Rust bm25 crate) | name (3 spellings), title, description, top-level argument names, the server's name and description; not argument descriptions | 8 by default; the model can set a limit |
| Gemini API (preview) | no: you mark functions or a whole MCP server | the model names the exact tools it wants; no search on Google's side (measured) | the model reads names and descriptions | the tools the model names (1 to 5 in my tests) |
| Copilot in VS Code | yes | embeddings for Claude models; OpenAI's hosted search for OpenAI models | not stated | not stated |
| Cursor | yes, for MCP | model-driven: descriptions synced to a folder per server, the agent lists and reads them | whatever the agent reads | n/a |
| Antigravity | yes, all MCP tools are lazy unless marked eager | model-driven: the agent reads each tool's schema file before calling it | n/a | n/a |
| Kiro | yes in the IDE (1.3+) and CLI V3 (2.31+); opt-in in V2 | V3: the model loads exact tool IDs (model-driven); V2: a "legacy tool_search", mechanism not stated | names and descriptions | not stated |
| Copilot CLI | yes, from about 30 tools, on supported models (Claude 4.0+ families, GPT-5.4+) | not stated | name, description, argument names and descriptions | not stated |
| Grok remote MCP | no | no search: every definition is sent | n/a | n/a |
| Gemini CLI | not documented | not documented | n/a | n/a |
Two details that matter in practice. Claude Code's docs say it cuts server instructions and up-front tool descriptions at 4,096 characters. Tool descriptions loaded through search can be up to 16,384 characters, but search matching reads only the first 4,096. In Codex's source, the server's name and description are indexed into every one of its tools, so a server whose description matches the request lifts all its tools. That matters when servers compete.
What nobody publishes
- Claude Code: which search variant it uses.
- OpenAI hosted search: the matching method and result count (I measured them; they vary by model and can change without notice).
- Gemini API: nothing to match on Google's side (the model names tools; measured); the docs don't say so outright.
- Copilot CLI and Kiro V2: the algorithm and result count.
- Cursor: any tool limit (the "40 tools" figure is from forum posts, not docs).
Some of these differences become visible in the rankings and API calls in The same MCP tool ranks 23rd in one simulation and 7th in another. Their practical implications for server authors are explored in Making MCP tools findable across AI clients.
Sources
- Claude API tool search: https:/
/ platform.claude.com/ docs/ en/ agents-and-tools/ tool-use/ tool-search-tool - Claude Code MCP: https:/
/ code.claude.com/ docs/ en/ mcp - OpenAI tool search: https:/
/ developers.openai.com/ api/ docs/ guides/ tools-tool-search - Codex source at 3869f39: https:/
/ , .../github.com/ openai/ codex/ blob/ 3869f39/ codex-rs/ core/ src/ tools/ handlers/ tool_search.rs codex-rs/ , .../core/ src/ tools/ handlers/ mcp.rs codex-rs/ , .../core/ src/ mcp_tool_exposure.rs codex-rs/ tools/ src/ tool_discovery.rs - Gemini API Tool Retrieval: https:/
/ , https:/blog.google/ innovation-and-ai/ technology/ developers-tools/ gemini-api-tool-retrieval/ / aistudio.google.com/ docs/ tool-retrieval - Antigravity MCP: https:/
/ antigravity.google/ docs/ mcp - Gemini CLI MCP: https:/
/ github.com/ google-gemini/ gemini-cli/ blob/ main/ docs/ tools/ mcp-server.md - Copilot CLI tool search: https:/
/ docs.github.com/ en/ copilot/ concepts/ agents/ copilot-cli/ tool-search - VS Code token efficiency: https:/
/ code.visualstudio.com/ blogs/ 2026/ 06/ 17/ improving-token-efficiency-in-github-copilot - Cursor: https:/
/ , https:/cursor.com/ blog/ dynamic-context-discovery / cursor.com/ docs/ context/ mcp - Kiro tool search: https:/
/ kiro.dev/ docs/ mcp/ tool-search/ - xAI remote MCP: https:/
/ docs.x.ai/ developers/ tools/ remote-mcp - Measurements of OpenAI's hosted search and Gemini's Tool Retrieval: my own runs, 19 Nov 2026; raw responses at https:/
/ github.com/ niksa90/ toolmenu/ tree/ 6fa4113267792f930e11899f977cec5084189a7e/ bench/ results/ 2026-11-21-tool-search