Claude tool search limits: 200-char regex, 500-char BM25, 5 results

Claude's tool search tool has fixed limits on pattern length, results and deferred tools. What they mean for a Sume hosted MCP tool list.

6 min readSume
All posts

Claude's server-side tool search tool accepts a regex pattern up to 200 characters or a natural-language query up to 500 characters, returns up to 5 tools per search by default, and supports up to 10,000 deferred tools per request. If you attach Sume's hosted MCP server through the MCP connector, that means Sume's tool list fits comfortably, and the names and descriptions Claude searches decide whether it finds the right tool.

The limits

These are the documented limits for Claude tool search, read on 2026-10-08.

Tool search limits, Claude API docs, read 2026-10-08
LimitValue
Regex pattern length200 characters (Python re.search, case-insensitive)
BM25 query length500 characters
Results per search5 by default; Claude may set limit from 1 to 10,000
Deferred tools per request10,000
Fields searchedTool names, descriptions, argument names, argument descriptions
Models including Haiku 5.5Both regex and BM25 variants

How the MCP connector fits

With the MCP connector you do not set defer_loading on individual tools. You set it once on the mcp_toolset entry's default_config, or per tool in configs. The connector itself supports tool calls only from the MCP specification, needs a server reachable over HTTPS, and takes an authorization_token for OAuth. Sume's hosted MCP at https://mcp.sume.com/mcp accepts a Bearer token that is either an OAuth token or an API key.

Tool search is not metered as a separate server tool. Definitions that a search loads count as input tokens, so a smaller loaded set is cheaper.

Writing for the search

Claude searches names and descriptions, so Sume's own naming does the work. Sume's tool ids already carry resource prefixes, for example jobs_wait, jobs_status and jobs_result for job handling, and assets_create for assets. Anthropic recommends consistent namespacing so one search matches a group, which these names give you.

A short system-prompt line also helps, as Anthropic suggests: describe the categories, such as video generation, assets and job polling, so Claude's patterns are broad enough. Keep your most used tools undeferred; the next post in this set covers which ones.

Where discovery still belongs to Sume

Tool search finds a tool. It does not tell Claude the exact contract. Sume documents tools_schema for fetching one tool's contract by name, and says to use tools_list and tools_schema rather than assuming parity with the public API. Keep that step in the agent's instructions, and read progressive discovery for large tool sets for the Sume side.

Failure modes the vendor lists

Tool search can return an error in a 200 response body rather than an HTTP error. Anthropic lists four codes: invalid_tool_input for a malformed pattern or one over the 200-character limit, unavailable, too_many_requests and execution_time_exceeded. A search that matches nothing returns an empty tool_references array, not an error.

For a Sume agent, handle the empty result by falling back to tools_list, which lists everything the session can see. That keeps a bad regex from making the agent believe a tool does not exist.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume