Inside OpenToolSearch — Open-Source Tool Search for Agents with 1,000 Tools
OpenToolSearch pairs a 0.6B embedder with a 0.6B reranker to search MCP tool and skill libraries on your own GPU in 0.1 s per query. We cover its architecture, how to read its benchmarks, integration patterns and limitations.
Keep connecting MCP servers and, at some point, your agent can see more than a few hundred tools. Every internal system gets an MCP server, every team writes skills, users start adding servers of their own, and 1,000 tools arrive quickly. The problem is that you cannot put all of those definitions in the prompt. A thousand tool definitions come to roughly 118,000 tokens; the descriptions of 59 skills alone are about 16,600.
That is why model API providers now ship tool search as a hosted feature: the model gets a single search tool, and the definitions of the tools it searches for are loaded only when needed. OpenToolSearch brings the same idea to open-weight models you run yourself. It was released by AI3 Inc. in November 2026; the code and both models are Apache-2.0.
This post is an analysis based on the repository's README, BENCHMARKS and DEVELOPMENT documents (v0.2.1, as of 2026-11-23). Every number here was measured and published by the project; we have not reproduced them.
TL;DR: OpenToolSearch's strength is not first place on quality — it is speed, cost and data sovereignty: 0.10 s per search, $0.19 per 1,000 searches, and your tool descriptions never leave your machines. On the public benchmark its quality sits in the middle of the hosted tool search offerings, and with 200 tools or fewer there is little reason to use it.
At a glance
| Item | Details |
|---|---|
| Repository | ai3inc/opentoolsearch (Apache-2.0), version 0.2.1 |
| Models | opentoolsearch-embed-0.6b (embedder), opentoolsearch-rerank-0.6b (reranker), 1.2B parameters in total |
| Base models | Fine-tuned from Qwen3-Embedding-0.6B and Qwen3-Reranker-0.6B respectively |
| Install | pip install git+https://github.com/ai3inc/opentoolsearch (weights download from Hugging Face on first use) |
| Speed | 0.10 s per search on one B300 GPU at full throughput; median 66 ms for a single request |
| Cost | $0.19 per 1,000 searches (B300 GPU time), about 37,000 searches an hour |
| Index | In-process index, no vector database; 4.6 MB for 1,000 tools |
| Languages | Trained and evaluated mainly in English; Korean queries tested separately |
What tool search solves
The basic way agents use tools is function calling: each request carries the JSON schemas of the available tools, and the model picks one to call. That works with dozens of tools. With hundreds or thousands, three problems appear.
- Token cost — tool definitions occupy the context window on every request. The agent uses only a handful, yet all 1,000 definitions are sent every time.
- Selection quality — the more tools with similar names and descriptions, the more likely the model picks the wrong one.
- A library that moves — MCP servers and skills are added daily and edited hourly. You cannot freeze the tool list into a prompt.
Tool search solves this with deferred loading. The model initially sees only one tool, tool_search, and searches for the capability it needs in natural language. Only the definitions of the top few matches go into the next request.
Hosted tool search turns this flow on with a single parameter, but by the project's measurements each search takes 2.5–12 seconds and the tool library is sent to the provider on every call. OpenToolSearch replaces that search step with a small index inside your own process and two small models.
Architecture: two-stage search with two small models
The search has the same two-stage shape as the retrieval step of RAG; it just retrieves tool definitions instead of documents.
- Stage 1, embedder — every tool is embedded once ahead of time; the query is embedded and the 25 closest tools are taken (library default
rerank_top=25). The project reports that 25 candidates give almost the same quality as 50 at twice the throughput. - Stage 2, reranker — a cross-encoder that reads the query next to each candidate's definition. It costs more than embedding similarity but orders candidates more accurately.
- Score fusion — the final score is a weighted sum of the reranker score and the stage-1 score, each z-normalised over the candidates (default
fuse=0.5). In the project's measurements, the reranker alone scored 55.98 and the embedder alone 52.42, while the fusion reached 58.2: the two models make different mistakes.
The stages are independent models, so either can be swapped. The embedder is a plain sentence-transformers model and the reranker uses the Qwen3-Reranker format, so other Qwen3-Reranker-format models drop in.
Built for libraries that keep changing
The most practical part from an operations point of view is the cost of keeping the index current. The embedder reads each tool on its own, so adding or editing one tool never changes any other tool's vector. Re-embedding only what changed yields the same index as a full rebuild (project measurement: top 5 identical on all 200 requests).
| 1,000-tool library, one B300 | Time | Texts embedded |
|---|---|---|
| Add a new tool or skill | 16 ms | 1 |
| Change a description | 17 ms | 1 |
| Remove one | under 1 ms | 0 |
Re-scan the library (sync: 35 edits, 5 additions, 5 removals) | 143 ms | 40 |
| Save / load the index (4.6 MB) | 14 ms / 4 ms | 0 |
| Build from nothing | 0.9 s | 1,000 |
No vector database and no nightly re-embedding job. An MCP server or skill a user registered a minute ago is searchable on the next request. The design targets libraries that keep changing: agent platforms where users add servers, per-team skill repositories and the like.
Benchmarks
Here is the project's summary table. Scores are nDCG@10; costs are per 1,000 searches.
| System | Kind | ToolRet (public) | OTS-MCP-1k (own) | Korean queries | Cost / 1,000 | Median latency |
|---|---|---|---|---|---|---|
| Gemini tool search · gemini-4-hydrogen | hosted | 73.5 | 88.3 | 83.8 | $30 | 10.0 s |
| Tool-DE (4B + 4B) | open weights | 72.0 | 91.4 | 89.5 | $0.29 | 0.15 s |
| OpenToolSearch (Embed-0.6B + Rerank-0.6B) | open weights | 70.8 | 89.0 | 88.2 | $0.19 | 0.10 s |
| Gemini tool search · gemini-3.8-flash | hosted | 70.6 | 85.6 | 79.0 | $17 | 9.95 s |
| OpenAI tool search · gpt-6.2-sol | hosted | 66.6 | 82.4 | 81.1 | $34 | 3.43 s |
| OpenAI tool search · gpt-6-luna | hosted | 65.5 | 88.2 | 85.5 | $0.35 | 3.15 s |
| Claude tool search · Opus 5.5 max effort | hosted | 60.1 | 61.8 | 58.9 | $62 | 11.8 s |
| Claude tool search · Haiku 5.5 | hosted | 53.3 | 57.1 | 56.5 | $0.52 | 2.53 s |
- ToolRet: a public tool retrieval benchmark; 769 questions, each searched within its own source dataset.
- OTS-MCP-1k: 1,000 MCP tools and 200 requests built by the project.
- Korean queries: the same 200 OTS-MCP-1k requests in Korean, with tool descriptions left in English.
- Hosted costs are the lower of list price and cache-aware price (November 2026); open-model costs are GPU time on one B300. Open-model latency is time per search at full throughput (waves of 8 requests).
Caveats when reading the table
It is not first on the public benchmark. On ToolRet, OpenToolSearch (70.8) trails gemini-4-hydrogen (73.5) and Tool-DE (72.0), and sits mid-pack among hosted tool search. The project itself says its quality is "competitive, not first".
Weigh the in-house dataset lower. OpenToolSearch scores near the top on OTS-MCP-1k (89.0), but the project built that set, and with only 200 requests it cannot separate differences of about 3 points — as the project also notes.
The public benchmark's labels have limits too. ToolRet marks a single tool as correct even when the pool holds interchangeable ones. By the project's analysis, 47.6% of the questions whose top result counted as "wrong" had a top result that an LLM judge found interchangeable with a labelled tool; crediting those lifts top-1 accuracy from 57.2% to 77.6%. Read the scores as relative comparisons under identical conditions, not as absolutes.
Decision models are not in the table. Hosted decision models (e.g. Jev, Gemini Decision) rank the candidates they are handed and cannot search a library themselves, so they are excluded. Given a first stage's candidates, they scored 77–78 on ToolRet — above every system in the table.
A number that matters for non-English users: Korean queries
With Korean queries over English tool descriptions, OpenToolSearch scores 88.2, above the best hosted tool search in the table (gpt-6-luna, 85.5). It loses 0.8 points against English queries, while Gemini tool search loses 4–7 points under the same condition. The project attributes this to a small share of machine-translated Korean requests in the embedder's training data. Other languages were not evaluated, and Korean was measured on that single 200-request set.
Speed and cost
Speed and cost are where OpenToolSearch clearly leads: 0.10 s per search is 25–120 times faster than hosted tool search (2.5–12 s), and $0.19 per 1,000 is 90–330 times cheaper than hosted search on flagship models. Even the cheapest hosted options (gpt-6-luna, Haiku 5.5) cost 2–3 times as much, according to the project. Note, however, that this is GPU-time cost assuming a GPU you already have and keep busy. If search volume is low and the GPU sits mostly idle, the real unit cost is much higher.
How it was built
DEVELOPMENT.md records what the team learned while building the models, failed experiments included. It is worth reading if you plan to fine-tune a tool retrieval model yourself.
- A model learns the training data's layout, too — fine-tuning on ToolRet's training set (three sources: ToolBench, APIGen, ToolACE) raised scores on those three sources and lowered them on the other 32 subsets. The model had learned to prefer the tool-definition layouts of those three sources, not just the task.
- Layout augmentation fixes it — during training, each tool definition is re-rendered in a random layout: renamed and reordered keys, JSON, YAML-like or Python-signature form. The 32 unseen sources then held (51.3 → 51.1) while the three seen sources gained (64.9 → 68.6).
- A weight average beats both halves — averaging the fine-tuned reranker 50/50 with the released one scored 55.98, above both the fine-tuned (51.68) and the released (51.85) model. The ratio was fixed at 0.5 beforehand and not tuned.
- A separate validation set — to avoid overfitting to ToolRet's test set, model selection used a separate set built from 67 MCP servers held out of training (738 questions, a 24,188-tool pool).
Every evaluation run and its cost is in results/LEDGER.md. On the other hand, the training recipe of the currently shipped embedder (v0.2) is not published: the weights are open, but the embedder cannot be reproduced from scratch.
Trying it out
Basic search
from opentoolsearch import ToolIndex
index = ToolIndex() # embedder + reranker; ToolIndex(reranker=None) for embedding search only
index.add(tools) # list of tool / function declarations (dicts)
hits = index.search("refund the customer's last order", k=5)
for h in hits:
print(h["name"], round(h["score"], 3))Keeping a changing library in sync
Save the index to disk and sync it with the current list of tools and skills at start-up. sync embeds only what is new or changed and drops what is gone.
import os
from opentoolsearch import ToolIndex
index = (ToolIndex.load("tool_index/")
if os.path.exists("tool_index/meta.json") else ToolIndex())
index.sync(all_tools_and_skills_now)
index.save("tool_index/")
# for a conversational agent, pass the last few turns as the query, not just the last line
hits = index.search(recent_conversation, k=5)The repository also has an example that searches a folder of SKILL.md files (examples/skill_search.py).
A client-side tool_search loop
Give the model only tool_search; when it calls it, add the matching tools to the next request. This works with any model that supports function calling, regardless of provider.
search_tool = index.search_tool() # JSON Schema declaration for tool_search
# 1. call the model with tools=[search_tool]
# 2. when it calls tool_search(query=...):
loaded = index.handle(call_arguments) # full declarations of the best matches
# 3. call the model again with tools=[search_tool, *loaded]A complete loop against any OpenAI-compatible endpoint is in examples/deferred_openai.py, so it applies equally to open models served in-house, for example with vLLM.
Exposing tools by permission
allowed=[...] restricts a search to the tools a user may call. Keeping out-of-scope tools from ever becoming candidates also matters for agent security: a model cannot misuse a tool it never learns exists. Permission checks at execution time are, of course, still required.
Swapping a stage
# a bigger reranker: Tool-DE's Tool-Rank-4B, ranking by the reranker alone
index = ToolIndex(reranker="Lux1997/Tool-Rank-4B", fuse=0.0)
# another embedder in front of the OpenToolSearch reranker (give the query format it expects)
index = ToolIndex(model="Qwen/Qwen3-Embedding-0.6B",
query_prefix="Instruct: Given an agent's request for a tool, "
"retrieve the MCP tool that fulfills it.\nQuery: ")In the project's measurements, the OpenToolSearch embedder followed by Tool-Rank-4B (4.6B in total) scored 71.8 / 90.8 / 90.8 (ToolRet / OTS-MCP-1k / Korean), close to Tool-DE (8B), with the highest Korean score of any system in the table. It is slower and costlier than the default, though: 0.25 s per search and $0.49 per 1,000.
When to use it — and when not to
| Situation | Recommendation |
|---|---|
| A small catalogue of 200 tools or fewer | Skip tool search and give the model the whole list, or give a decision model the whole list. In the project's measurements, decision models scored 85.7–86.3 on the small subsets, against 76.7 for OpenToolSearch. |
| Hundreds to thousands of tools; descriptions that must stay in-house; no API dependency; 0.1 s answers | Run OpenToolSearch on your own GPU. |
| A little more open-weights quality | OpenToolSearch embedder + Tool-Rank-4B: 0.25 s, $0.49 per 1,000. |
| The highest quality | OpenToolSearch finds candidates and a decision model makes the final pick. The best quality the project measured (ToolRet 76.8–77.3), but tool descriptions go to an external API. |
| You already call a hosted model and want the least code | The provider's built-in tool search: one parameter, but seconds per search and $0.35–105 per 1,000. |
Our take
What caught our attention is less the benchmark score than where the search runs. A recurring requirement in agent projects for our customers in finance, the public sector and manufacturing is that information about internal systems must not leave the premises. Hosted tool search sends the tool descriptions — that is, the API structure and capability list of internal systems — out on every call. Where the descriptions themselves are sensitive, that is hard to accept.
OpenToolSearch is 1.2B parameters across its two models. The project's numbers come from a single B300, but by model size alone this is not a setup that needs a large GPU cluster. When you assemble an in-house agent on open models, as in our air-gapped coding agent platform design, it gives you the option to keep the tool search step in-house as well. Before adopting it, we recommend checking the following.
- Re-measure on your own tools — the published numbers come from a mostly English MCP tool set. Internal tools differ in naming and description style, and descriptions may mix languages. Build a ground-truth set from a few hundred real request logs and measure again.
- Clean up tool descriptions — a retrieval model judges tools only by their descriptions. If descriptions are thin or near-duplicate tools abound, no retrieval model will find the right one.
- It is an early project — version 0.2, released in November 2026, with the embedder's training recipe unpublished. Watch how maintenance develops before making it an operational dependency.
- GPU utilisation — the $0.19 figure assumes a well-utilised GPU. At low search volume, measure latency and unit cost on the hardware you have, and compare with an embedding-only setup (
reranker=None).
Wrapping up
- Once tools number in the hundreds, putting every definition in the prompt hits its limits, and tool search with deferred loading is becoming the standard pattern.
- OpenToolSearch handles that search on your own infrastructure with two 0.6B models. Its quality is on par with hosted tool search, and it has clear advantages in speed, cost, and keeping tool descriptions in-house.
- With few tools you do not need it; for the highest quality, pair it with a decision model. Either way, re-measure on your own tool set before deciding.
References
- OpenToolSearch on GitHub (README, BENCHMARKS.md, DEVELOPMENT.md, results/LEDGER.md)
- opentoolsearch-embed-0.6b (Hugging Face)
- opentoolsearch-rerank-0.6b (Hugging Face)
- MCP (Model Context Protocol) Guide - The New Standard for AI Tool Integration
- RAG (Retrieval-Augmented Generation) Complete Guide - From Architecture to Production