# Three MCP Tools, Not Hundreds: Building Fabric Tool Search

> Fabric’s Tool Search keeps hundreds of MCP tool definitions out of the agent’s context to prevent bloat making requests ~97% smaller and save ~62% cost.

Fabric Gateway, from Postman. This is the Markdown version of https://fabricgateway.ai/blog/building-mcp-toolsearch-for-fabric-gateway/.

By [Ekam Walia](https://www.linkedin.com/in/ekamwalia/) · December 1, 2026 · 8 min read

![Diagram: an agent connects to one Fabric Gateway endpoint and sees three tools (search, get, execute); behind the gateway, Fabric fronts many MCP servers, such as GitHub, Slack, New Relic, Atlassian, Figma, Orbit and Postman](https://fabricgateway.ai/blog/mcp-tool-search/gateway-endpoint.png)

One MCP endpoint for the agent. Fabric Gateway fronts every MCP server on the route.

LLMs are good at identifying the right tools for a task when they are given a handful of tools. But connect some popular MCP servers like Atlassian, Slack and GitHub and suddenly your agent’s context fills up with tool definitions from 200-300 tools and 10-15% of a 1M-token window is gone before the user types a word. The model now has to pick the right tool out of hundreds.

Fabric Gateway’s Tool Search plugin addresses this in the MCP gateway. Instead of the entire tool directory, the agent sees three tools, `search_tool`, `get_tool` and `execute_tool`, and uses them to discover and load the rest on demand. In our benchmarks, Tool Search reduced agent cost by ~62% with a minimal drop in task completion. This post covers why tool search is needed and how it was built for Fabric Gateway.

![Bar chart, average of Claude Opus 5.5 and Sonnet 5.5: the first request is 119k tokens (~12% of a 1M-token window) with every tool listed and 3.3k (~0.3%) with Fabric Tool Search; peak context per task is 180k (~18%) with every tool listed and 61k (~6%) with Tool Search](https://fabricgateway.ai/blog/mcp-tool-search/first-request-context.png)

399 MCP-Atlas tasks tested with and without Tool Search against Claude Sonnet 5.5 and Opus 5.5.

## The cost of a large tool catalog

MCP makes it easy to connect an LLM to external services. A gateway is where that happens for a team: one endpoint, one place for auth and policy, and every server the team relies on goes behind it. The catch is that MCP clients load every tool they’re offered. The tool count grows with the number of servers you connect, not with what a task needs. Most MCP servers expose [around a dozen tools](https://dev.to/serverdex/i-measured-the-context-cost-of-13658-live-mcp-servers-most-are-cheap-a-few-eat-your-whole-window-3kp0), but popular SaaS servers like Slack and Notion expose 20 or more, and the largest go much further: GitHub has ~100 tools and Atlassian’s full list has ~270. Each task needs only a small subset of these tools, but the context still carries all of them.

You pay for that in three ways:

- **Context:** tool definitions grow with the number of tools. In our test catalog, 285 tools across 33 servers put ~119k tokens in the first request, ~12% of a 1M-token window, before the conversation started. Larger tool catalogs or smaller windows make the share bigger.
- **Cost:** you pay for those tokens on every turn. Prompt caching makes the repeats cheaper, but they still incur cost.
- **Tool choice:** every tool the model sees is another option to weigh. A new server can bring tools that look like ones that already worked, such as a second `list_projects` or `create_issue`. A wrong pick shows up as an error or, worse, as a plausible wrong answer. How much this hurts depends on the size of the tool catalog and the model.

## How Tool Search works

With the plugin on, `tools/list` returns only three tools: `search_tool`, `get_tool` and `execute_tool`. The model describes what it needs in its own words and searches for it. It loads the schemas of the tools it picks, then calls them through Fabric. If none of the results fit, the model searches again with a different query.

1. **Search.** The model writes a query in its own words, such as "list open pull requests in a repository", and calls `search_tool`. Fabric ranks the tools this caller is allowed to use by embedding similarity and returns the top results with short summaries.
2. **Load.** The model picks relevant matches and calls `get_tool` to load their full descriptions and input schemas. A tool’s full schema enters the context only when the model loads it with `get_tool`.
3. **Execute.** The model calls `execute_tool` with the tool’s name and arguments. Fabric unwraps the call, runs access control and other configured plugins against the real tool, and sends it upstream as an ordinary MCP tool call. The result comes back unchanged.

In the benchmark runs, the first request with Tool Search, including the three meta-tools and the server list, was ~3.3k tokens, against ~119k with every tool listed. The agent made 2.5 searches per task on average. Each search returned tool names and short summaries, not schemas.

![Sequence diagram: the agent lists three meta-tools from Fabric Gateway, searches and gets a ranked list of matching tools, loads a tool’s definition and schema with get_tool, then calls execute_tool; Fabric proxies the call to the upstream MCP server and returns the result unchanged](https://fabricgateway.ai/blog/mcp-tool-search/call-flow.png)

How a tool call flows through Tool Search: search, load the schema of the chosen tool, then execute it through Fabric Gateway.

## Designing Tool Search for accuracy and scale

Reducing the number of tools in context was the easy part. The harder problem was making sure the agent could still find the tools it needed to complete a task.

The first version of Tool Search had one goal: keep the context small. Search returns tool names and short summaries, not schemas, and a full schema only enters the context when the model asks for it with `get_tool`. We could have returned schemas with every result and saved that round trip, but then every search would carry schemas for tools the model mostly never uses.

Reliable search is the core piece of Tool Search. We experimented with a few different approaches, including BM25 keyword search, regex queries, plain vector search and a hybrid of BM25 and vectors. All of them were effective at reducing context bloat and saving cost, but they had different impacts on quality. BM25 and regex hurt quality more than vector search, which matches on intent. In an earlier round of benchmarks with Claude Sonnet 5.5, on a 34-server catalog and before the per-server cap described below, vector search had a 68.5% task completion rate, against 65.4% for BM25 and 63.7% for the hybrid. Hybrid search is common and can be tuned with a few parameters, but plain vector search keeps the failure modes simpler and makes it easier to see why a tool did or didn’t show up, so that’s what we built. Another advantage of vectors is that more capable models write better queries that describe their intent, and vector search rewards that; keyword matching doesn’t.

Fabric embeds each tool’s server, name and description, embeds the model’s query the same way, and ranks tools by cosine similarity. We also tried out different embedding models, but the differences in results were minimal, so the managed deployment of Fabric uses [`BAAI/bge-small-en-v1.5`](https://huggingface.co/BAAI/bge-small-en-v1.5). On self-hosted data planes, customers can choose an embedding service of their own.

Getting here took a few rounds. In early benchmark runs, the first version failed tasks that were completed with every tool listed. For example, with only three meta-tools in view, the agent couldn’t tell there was a database behind the gateway, so when a task asked about data in "our database", it asked the user to share the data instead of searching for a database tool. That’s why the server list went into `search_tool`’s description. Tools whose names matched a query’s nouns crowded out general tools like "run a shell command", and a query that matched one server’s naming could fill every slot with that server’s tools. We tried different configurations and found 20 results to be a good default: high enough to surface the right tools, but low enough that each search shows the agent a small slice of the catalog. Each search shows at most 20 of the 285 tools, about 7%, and across a whole task the agent saw ~25 distinct tools in its search results on average, about 9% of the catalog. Search also takes at most 5 from any one server before filling the rest with the next-best matches.

## Evaluating Tool Search at real-world gateway scale

In our evaluations on a modified MCP-Atlas setup, run with Claude Opus 5.5 and Sonnet 5.5, Tool Search cut agent cost by ~62% and peak context use by ~66% compared with listing every tool, with a minimal drop in task completion.

Scale AI’s [MCP-Atlas](https://github.com/scaleapi/mcp-atlas) is a multi-turn benchmark for tool use on real MCP servers like GitHub, git, a filesystem, a shell, Slack and web search, and every task ships with a short, hand-picked tool list. It was designed to evaluate how well different models find and use the tools available to them. It isn’t designed for evaluating MCP gateways, but it has a good set of public tasks with many tools across servers, so we used it as our baseline. On this benchmark, Tool Search does what it was built to do: context bloat drops and cost falls sharply, while task completion on MCP-Atlas sees a small drop.

MCP-Atlas is a good starting point, but MCP gateways are built to expose hundreds of tools. To make our evals closer to real-world use cases, we modified MCP-Atlas to expose all tools from all servers on every task, instead of the roughly 15 hand-picked tools per task that Atlas uses. Collectively, 399 tasks across 285 tools from 33 servers are exposed to the models in this eval. The tasks and the judge are the same as in Atlas. This modification ruled out OpenAI models, whose API accepts at most 128 tools per request, so we ran the evals on Claude Opus 5.5 and Sonnet 5.5. A task counts as completed when its answer covers at least 75% of the expected facts.

![Key results on 399 MCP-Atlas tasks with 285 tools across 33 servers: Fabric Tool Search used ~59% fewer prompt tokens per task and cost ~62% less than listing every tool up front](https://fabricgateway.ai/blog/mcp-tool-search/key-results.png)

Fabric Tool Search compared with listing every tool up front.

| Parameter | All tools up front | Fabric Tool Search |
| --- | --- | --- |
| First request | ~119k tokens (~12% of 1M) | ~3.3k tokens (~0.3% of 1M), **~97% smaller** |
| Peak context per task | ~180k tokens (~18% of 1M) | ~61k tokens (~6% of 1M), **~66% smaller** |
| Prompt tokens per task | ~910k | ~371k, **~59% fewer** |
| Agent cost, all tasks | ~$347 | ~$131, **~62% lower** |
| LLM turns per task | ~5.3 | ~8.9 |
| Task completion rate | ~82.1% | ~78.6% |

#### Context usage

**Tool Search frees up the context window for the work itself.** Over a whole task, the largest request filled ~18% of the window on average with every tool listed and ~6% with Tool Search, about 12 points freed. For the heaviest 5% of tasks it went from ~43% to ~28%. That space goes to the conversation and the results of tool calls instead of tool schemas.

#### Cost

**Turning on Tool Search is a single toggle, and it cut agent cost by ~62%.** The saving comes from tokens. With every tool listed, every request carries the full tool catalog, and the first request alone is ~119k tokens; with Tool Search it’s ~3.3k. Prompt tokens per task fell from ~910k to ~371k, ~59% fewer, and agent cost fell ~62%. Cost falls slightly more than tokens because each conversation’s first request writes the full tool catalog to the prompt cache, and cache writes cost far more than cache reads. About 80% of prompt tokens were cache reads with every tool listed and about 83% with Tool Search, so the saving comes on top of caching.

That holds even though Tool Search adds calls. It takes an average of ~8.9 LLM turns instead of ~5.3, and output tokens rose ~28%, from ~1.4k to ~1.75k per task. However, the extra turns are small next to the full tool catalog on every request, so the token savings outweigh them.

## Get started

Tool Search is a plugin on Fabric’s MCP gateway. [Set up your MCP servers in Fabric](https://docs.fabricgateway.ai/fabric/gateways/mcp-servers), then [turn on the Tool Search plugin](https://docs.fabricgateway.ai/reference/plugins/tool-search) for the route and point it at an embedding model. Your agents keep one MCP endpoint, and every server you add stops costing context on every request.

For a step-by-step setup, see [Manage MCP context with Postman Fabric Gateway](https://fabricgateway.ai/blog/manage-mcp-context-with-postman-fabric-gateway/). For an overview of the feature, see the [MCP Tool Search product page](https://fabricgateway.ai/product/mcp-tool-search/).

---

- [Homepage](https://fabricgateway.ai/)
- [Pricing](https://fabricgateway.ai/pricing/)
- [Book a demo](https://fabricgateway.ai/book-demo/)
- [Documentation](https://docs.fabricgateway.ai)
- [Sign up and log in](https://app.fabricgateway.ai)
- [Site summary for AI assistants](https://fabricgateway.ai/llms.txt)

