Tool Routing
Definition
The mechanism by which an agent system selects which tool(s) to use for a given request — from a potentially large set of available tools. Tool routing addresses the practical limitation that models degrade in tool selection accuracy when given too many options (typically above 20 tools). Routing strategies include: semantic routing (match request to tool descriptions via embeddings), category-based routing (narrow to a tool category first, then select within it), hierarchical routing (a routing agent selects a specialist agent), and dynamic tool loading (load only relevant tools into context per request).
Builder Context
If your agent has more than 15-20 tools, implement a routing layer. The simplest approach: embed all tool descriptions, embed the user's request, return the top-K most similar tools, and include only those in the model's context. This can reduce your tool set from 100+ to 5-10 per request, dramatically improving selection accuracy. For production: cache the routing decision for common request patterns. The routing model can be much cheaper than your main model — a small classifier or embedding comparison is sufficient.