OpenSmartRoute enables developers to utilize a range of tools within a routing system. These tools, such as a calculator and image generation tools, are invoked by the model to augment its decision-making process, and the router manages the execution and integration of these tools within a larger workflow.
Tool Invocation and Routing
The router calls tools through tools/call requests, triggered by the model when it determines a tool is needed. The router then executes the tool, which can be a built-in calculator or an external provider, and returns the result to the model for further processing, up to a configurable number of rounds, ensuring the final answer is as accurate as possible. A request that brings its own tools keeps its own tool protocol.
Tool Slots and Quality Floor
The router manages tool slots, configurable from 0 to 2 by default, to control the number of tools it can call for a single request. The RoutingSettings.tool_quality_floor determines which tools are considered, with a score between 0.47 and 0.75 triggering a call. The model still decides whether to call an offered-but-unused tool, which only costs its spec tokens.
Tool Types
The router supports several tool types, including a built-in calculator (tool-calculator) that executes arithmetic and unit conversions deterministically, and image generation tools (actions: [image]) that execute once mapped to a provider through POST /images/generations. Previously, both tools routed but every execute: true / chat request that landed on them failed with "target X has no handler".
MCP Server Interaction
MCP clients, such as Cursor or Claude, interact with the router over JSON-RPC, requesting tools and receiving decisions or the executed answer. The server handles the routing logic, selecting the appropriate tool based on the request and the configured tool slots, and provides a trace of the execution.
State Store
The router leverages a shared state store (Redis / Postgres) to maintain context across multiple requests, enabling features like named state stores and versioned state store migrations. This shared state is crucial for maintaining consistent routing decisions and improving performance.
Scaling Tool Execution
To test scalability, a fresh install routes to an MCP server's tools with no YAML written. With 5,000 synthetic tools, Match@1 stays within 5 points of the 50-tool figure. This demonstrates the router's ability to handle a large number of tools efficiently. For more information, see the .