Hermes Agent Boosts Tool Search Accuracy on Opus 4 – 74% Gain

Hermes Agent now includes a Tool Search feature that solves a common bottleneck in AI agent systems: the MCP context window overload. When multiple MCP servers are attached, every tool’s JSON schema is sent to the model on each turn, even if only one or two tools are needed. In a typical deployment with five servers and 34 tools, about 22 000 tokens—roughly half of the prompt—are just tool schema overhead. This inflates cost, with cache‑miss turns costing $0.07‑$0.10, and hurts accuracy because the model faces decision paralysis from hundreds of irrelevant options.

Tool Search works as an opt‑in progressive‑disclosure layer. Instead of loading all schemas up front, the model sees only three bridge tools: tool_search, tool_describe, and tool_call. The model first searches for the needed tool, then requests its full schema, and finally invokes it. All guardrails and approvals still apply to the real tool behind the bridge.

Under the hood, Hermes uses BM25 to match the model’s query against tool names, descriptions, and parameter names, falling back to a substring match when needed. The tool catalog is rebuilt each turn from the live registry, preventing drift. Auto mode activates only when deferred schemas would exceed 10 % of the model’s context window, so small toolsets incur no overhead.

Anthropic’s internal MCP evals show clear accuracy gains: Claude Opus 4 improves from 49 % to 74 % and Opus 4.5 from 79.5 % to 88.1 % when Tool Search is enabled, alongside an 85 % reduction in tool‑definition token usage.

To enable it, add to hermes.yaml:

tools:
tool_search:
enabled: auto
threshold_pct: 10
search_default_limit: 5
max_search_limit: 20

or simply set tool_search: true for the default auto behavior.

Use Tool Search when you have many MCP servers, only a few tools per turn, or notice high token overhead and accuracy loss. Keep core Hermes tools (terminal, read_file, web_search, etc.) always direct; only MCP and non‑core plugins are deferred.

#AI #Product #LLM #ML #ToolUse #AIAgents