LiteLLM MCP toolsets and tool search

Named toolsets and tool search keep an agent's tool list small when hundreds of MCP tools are registered behind one LiteLLM gateway. This page explains how each works, when to use them and what to confirm.

On this page

Why LiteLLM MCP toolsets and tool search matter at scale

When many MCP servers sit behind one LiteLLM gateway, the tool list itself becomes the problem. Every tool a key can reach is presented to the model, so a model that sees hundreds of tool definitions spends context on choices it will never make and is more likely to pick the wrong one. LiteLLM addresses this with two mechanisms: named toolsets, which limit each agent to a chosen set of tools, and tool search, which hides the full catalog behind a small set of meta-tools. Toolsets are the right first control when you know which tools a given agent or team needs. Tool search is the better fit when the catalog is large or changes often and the model should find tools by keyword at run time.

A LiteLLM toolset is a named collection of specific tools drawn from one or more MCP servers, so an agent gets only the tools it needs. This matters most when one workflow needs a few tools from a ticketing server, a documentation server and an internal database server, and should not see the rest of each. Because a toolset can span several servers, it is the unit you govern, document and review, rather than each server in isolation. Before you build toolsets, inventory which tools each team uses, which of them write data, and which must stay out of a given agent's view. Confirm in the LiteLLM MCP toolsets documentation how toolsets are attached to keys or teams in your LiteLLM version.

Tool search works differently. According to the LiteLLM MCP tool search documentation, it exposes four meta-tools: mcp_tool_search, mcp_tool_call, agent_search and skill_search. A key with hundreds of registered tools therefore shows only these four on tools/list. The model searches by keyword, finds the matching tool, and invokes it through mcp_tool_call. The consequence is that the model's visible surface stays small and stable no matter how many servers you register, but every call now passes through a search step, so you should test whether your agents find the right tools for your common tasks and log the search queries to review misses.

The two approaches also shift where your controls sit. Toolsets decide in advance what can be found, while tool search decides what can be found at run time, so permission design still matters after you turn search on. Plan a review of which MCP servers and tools any key can reach, confirm the tool search settings for each key or team in your deployment, and test the four meta-tools against a sample of your real tasks before rollout. Access rules are covered in the access control section of this page, so the decision here is which control shapes the model's view of the catalog.

Toolsets, tool search or both: which option fits which agent

This table compares full tool exposure, named toolsets and tool search across the agent types most teams run. Read each row against your own tool count and who maintains the tool list, and the main takeaway is that the option with the smallest visible surface is usually the easiest to audit.

OptionSmall fixed agentShared assistant across teamsLarge catalog needing keyword discovery
What the model sees on tools/listEvery tool on the key, which is acceptable when the list is shortTools that the key's toolset allows, so the list varies by callerFour meta-tools only: mcp_tool_search, mcp_tool_call, agent_search and skill_search
Full tool exposureGood fit when the agent needs a handful of tools from one serverPoor fit, because unrelated teams see tools they should not usePoor fit, because hundreds of tool definitions crowd the model's context
Named toolsetsWorks, but adds a configuration object for little gainStrong fit, with one toolset per team or role drawn from several serversWorkable, but toolsets must be kept current as the catalog changes
Tool searchUnnecessary overhead for a short fixed tool listUseful when teams need broad access and the model must find the right toolStrong fit, since the model discovers tools by keyword before calling them
Main maintenance burdenLow, mostly updating the list when the agent changesKeeping each toolset aligned with team roles and server changesTuning search terms and reviewing which tools the search can reach
Main riskA tool added upstream is exposed without reviewA toolset that is too broad silently grants access to sensitive toolsSearch surfaces a tool the caller was not meant to find, so permissions must still apply to mcp_tool_call
Where to confirm behaviorYour own tool list on the test keyPermission results for two keys from different teamsSearch results and call results for the same key before rollout

How the model finds and calls tools with tool search

Tool search replaces a long flat tool list with four meta-tools. A key with hundreds of registered tools shows only four entries on tools/list: mcp_tool_search, mcp_tool_call, agent_search and skill_search. The model first calls a search tool to find candidates, then calls mcp_tool_call to run the one it selected. Discovery and execution are separate steps, so your gateway logs will show both.

  • Four fixed entries: Clients see the same four names regardless of how many servers are registered behind them.
  • Discovery first: The model uses mcp_tool_search to locate candidate tools before any call is made.
  • Execution through one tool: mcp_tool_call carries the chosen tool invocation to the upstream MCP server.
  • Agents and skills: agent_search and skill_search cover A2A agents and skills through the same pattern.
  • Test the client: Confirm each client (IDE, chat front end or custom agent) handles a short tool list and sends the meta-tool calls correctly.

Before rollout, run a pilot key with a known tool count and check the tools/list response and the gateway logs for both steps.

Tool search keeps the model's view small while the gateway enforces permissions

The flow starts with an agent client connecting to the LiteLLM gateway, which is the trust boundary where key permissions apply. On tools/list, the gateway returns either the tools in the key's toolset or the four meta-tools when tool search is enabled. The model then sends a keyword search, and an mcp_tool_call goes through the gateway to the upstream MCP server, with results returning the same way. Check that the key's permissions, not the model's choices, decide which servers and tools are reachable.

Gateway checks key permissions before any tool reaches the model or an upstream server.

Setting up toolsets and tool search in LiteLLM

This sequence takes a LiteLLM gateway with many registered MCP tools and gives each agent role a narrow, verifiable view of them. Each step ends with a check so the team can confirm the visible tool list matches the design before agents depend on it.

  1. Confirm MCP servers are registered and reachable

    Before any toolset is defined, the platform team confirms that every MCP server the agents need is registered in the LiteLLM gateway and responds to a test call. Note the server names and the tool names each one exposes, because toolsets refer to tools by these names and tool name prefixing across servers affects how they appear. Done means each required server lists its tools through the gateway, and nothing is missing from the inventory you will design against.

  2. Group tools into named toolsets by agent role

    Work with the teams that own each agent to decide which tools each role actually needs. Create a named toolset for each role, selecting specific tools drawn from one or more MCP servers, so an agent gets only the tools its task requires. Record the design in a table with the toolset name, source servers, and included tools. Done means every role has a toolset and a reviewer has signed off that no toolset includes tools outside the role's task.

  3. Assign toolsets to keys or teams

    Attach each toolset to the virtual keys or teams that will use it, so access follows the identity that calls the gateway rather than the application code. Keep a list of which keys hold which toolsets, and flag any key that would inherit access to tools from more than one role. Done means each key or team maps to exactly one intended toolset in the design table, and the mapping is stored in your configuration review record.

  4. Enable tool search for large catalogs

    For keys whose catalog is still large after toolset scoping, enable MCP tool search. LiteLLM exposes four meta-tools, mcp_tool_search, mcp_tool_call, agent_search and skill_search, so the model finds and calls tools by keyword instead of receiving every definition up front. Confirm which keys use tool search and which use a fixed toolset, and document the reason for each choice. Done means the configuration lists the chosen mode per key and the team understands how the model will discover tools.

  5. Verify tools/list on a test key

    Create a dedicated test key for each role and call tools/list through the gateway endpoint. Compare the returned list against the design table: a toolset-scoped key should show only its named tools, and a key with tool search enabled should show only the four meta-tools even when hundreds of tools are registered. Record the visible tool count and names for each test key. Done means every count matches the design, and any mismatch is traced to the key, team, or toolset assignment before rollout.

  6. Check that tool calls succeed within scope

    Run a few representative tasks through each test key to confirm that the model can complete its work using only the visible tools. For tool search keys, confirm that a keyword search returns the expected tool and that mcp_tool_call reaches the correct upstream server. Also confirm that a tool outside the toolset cannot be called. Done means each role completes its test tasks, and out-of-scope calls are refused and logged, with results saved alongside the tools/list record.

  7. Record the design and review changes

    Store the final toolset definitions, key and team assignments, tool search settings, and verification records in your configuration repository or change system. Set a review step for any future change to a toolset, because adding one tool can widen what every key on that toolset can do. Done means the design is versioned, the verification evidence is attached, and the owners of each toolset are named.

What drives the effort of designing toolsets

Toolset design effort grows with how much is registered and who uses it. The drivers below connect to one another: a larger catalog creates more naming and testing work, and frequent changes multiply the cost of keeping every toolset correct.

Number of MCP servers and tools

Every registered MCP server adds tools that a toolset may need to include, exclude or rename. Count the servers and tools in each key's scope before drawing boundaries, because a key with hundreds of tools is where tool search starts to matter. Ask your team to list which tools each planned agent actually calls, since that list, not the full catalog, sets the size of each toolset.

MCP toolsets docs

Distinct agent roles

Each agent role, such as a support triage agent or a code review agent, usually needs its own toolset. The number of roles multiplies the number of toolsets to name, review, assign to keys or teams and retest. Map roles to the tools they need before building, and confirm which roles share a toolset so that overlap is deliberate rather than accidental.

Naming consistency across servers

Tool names from different MCP servers can describe the same action in different words, which makes keyword search and toolset selection harder. LiteLLM prefixes tool names by server, but the descriptions and parameter names inside each server are still set by its owner. Check descriptions for overlap and ambiguity, and agree on naming conventions with server owners where you control them.

Rate of catalog change

When upstream servers add, rename or remove tools, toolsets that reference them can silently drift. Frequent changes mean more reviews of toolset membership and more regression checks on the tools agents depend on. Ask each server owner how often tool lists change and whether they announce removals, and decide who approves a change before it reaches production agents.

Testing each toolset

A toolset is a permission boundary, so each one needs tests that confirm the expected tools appear and the rest do not. Test that tool search returns the right tools for typical keywords and that calls through mcp_tool_call succeed with the tool's parameters. Budget testing time per toolset, and repeat it after any upstream change, because a missing tool often fails quietly inside the agent.

Developer documentation

Developers building agents need to know which toolset to request, what each tool does and what limits apply. Without current documentation, teams guess at tool names or request broader access than they need. Record each toolset's purpose, owner, member tools and the agents that use it, and keep that record next to the configuration so reviewers can compare the two.

Questions buyers ask about LiteLLM toolsets and tool search

What drives the cost of designing LiteLLM MCP toolsets?

The main driver is how many MCP servers and tools are already registered and how many distinct groups of agents need different subsets of them. Each toolset needs a decision about which tools a team or agent actually uses, which tools are read-only, and which should never reach a model. Cost rises when tool inventories are large, undocumented, or owned by several teams who must agree on names and boundaries. Ask any partner for a fixed-scope quote that lists the servers in scope, the number of toolsets, the keys and teams that will use them, and whether testing against real agent clients is included.

How long does a toolset and tool search design and test cycle usually take?

Duration depends on the same drivers as cost: the number of MCP servers, the number of toolsets, how many teams must sign off, and how much of the upstream tool behavior is already documented. Tool search adds testing work because the model must find and call tools by keyword, so teams need to check that search terms return the right tools across a realistic set of prompts. Ask for a timeline in the written scope that ties each milestone to a named deliverable, and confirm which upstream servers must be available in a test environment before work starts.

What does the client's team need to provide for this work?

The work needs an inventory of MCP servers registered in the gateway, the tool names and descriptions each server exposes, and the business owners who can say which tools each team needs. It also needs access to a non-production LiteLLM proxy with PostgreSQL, a way to create test virtual keys, and at least one MCP client or agent to test against. Security reviewers should state which tools are high-risk, because those are usually excluded from broad toolsets. Confirm these items with your platform team before requesting a quote.

Can an internal team design LiteLLM toolsets without outside help?

Yes, if the team already runs LiteLLM, understands virtual keys and team permissions, and can read MCP tool lists. A named toolset is a configuration exercise: it selects specific tools from one or more MCP servers so an agent receives only what it needs. The harder parts are agreeing on naming, deciding which tools to hide, and testing that tool search returns the expected tools for real prompts. Internal teams often underestimate the test effort, so plan a review step with the agent owners before rolling changes out to production keys.

When should an organization bring in a partner for MCP toolsets?

Bring in a partner when the gateway serves many teams with conflicting tool needs, when several MCP servers must be combined into toolsets quickly, or when security review requires documented permission design and test evidence. A partner is also useful when the internal team lacks time to build a test harness for tool search. DeployOpen plans, implements, tests and documents self-hosted platform work inside the client's own infrastructure, and most engagements are fixed-scope with scope and deliverables agreed in writing before work starts.

Does tool search reduce what the model sees, and what should be checked?

Tool search exposes four meta-tools, mcp_tool_search, mcp_tool_call, agent_search and skill_search, so a key with hundreds of tools shows only these four on tools/list. The model then searches by keyword and calls the tool it finds through mcp_tool_call. Check that the permission model still applies to every search result, because a tool hidden from the list should not be callable through the meta-tool. Also check that keyword matches are reliable for the tool names your teams use, and that logs record which tool was finally invoked.

Can toolsets combine tools from several MCP servers under one name?

Yes. A LiteLLM toolset is a named collection of specific tools drawn from one or more MCP servers, so an agent receives only the tools it needs even when those tools come from different upstream servers. Design each toolset around a job or a team rather than around a server, and document which upstream server each tool comes from. Confirm with the vendor documentation how tool name prefixing applies when the same tool name exists on two servers.

How DeployOpen scopes and delivers toolset design

DeployOpen scopes toolset design as a fixed-scope engagement, so the list of MCP servers, the toolsets built from them, the keys and teams that receive each toolset, and the tool search configuration are agreed in writing before any work starts. The scope document should name every server that will be registered, every tool that belongs in each toolset, and which tools stay out of reach of each team. It should also state whether tool search is enabled for each key, because that decision changes what appears on tools/list. Deliverables are the configured toolsets, the permission mapping, a short runbook for changing a toolset, and a test report. Timelines and fees follow from that written scope, and DeployOpen provides a quote once the scope is fixed.

Testing covers what the model and the client actually see, not only whether the configuration saves. For each key or team, DeployOpen checks the tool list returned to the client, confirms that tools outside the toolset cannot be discovered or called through mcp_tool_search or mcp_tool_call, and confirms that the four meta-tools behave as the documentation describes for the keys in scope. Where a key has access to a toolset and to tool search at the same time, the test plan also checks that search results do not reveal tools the key is not permitted to use. Findings are reported with the exact configuration change needed and are retested after the fix. Ask the vendor or your own test environment to confirm the behavior of your LiteLLM version before you rely on it, because tool search is a newer feature area.

Most organizations need the catalog to change after go-live as servers are added, tools are renamed or new teams start using agents. DeployOpen offers optional retainers for ongoing catalog changes, including adding a server to an existing toolset, retiring a tool, rerunning the visibility tests and reviewing new releases before they reach production. Ask in the quote which changes are included in the retainer, how requests are logged and approved, and whether the retainer covers retesting after a LiteLLM upgrade. Keeping approvals in your own change process lets your security team see each permission change before it takes effect.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.