3.4.11
Introducing Tool Search
By default every time the provider is invoked all tools are loaded and transmitted to the backend LLM. Complex production agents connected to email, calendar, drive, CRM, and and multiple MCP servers can easily reach hundreds of tools, each carrying its name, description, parameter schema, and usage hints.
This release introduces the global middleware ToolSearchMiddleware that you can attach to your agent:
class MyAgent extends Agennt
{
...
/**
* Define the global middleware.
*/
protected function globalMiddleware(): array
{
return [
new ToolSearchMiddleware([
MyCustomTool::make(),
...CalculatorToolkit::make()->tools()
...MCPConnector::make([...])->tools()
]),
];
}
/**
* Provide core tools to the agent.
*/
protected function tools(): array
{
return [
// A list of core tools that the model always has available
TavilySearchTool::make(...),
];
}
}Here is the full documentation: https://docs.neuron-ai.dev/agent/middleware#tool-search