Class ToolSearchTool

java.lang.Object
org.springframework.ai.tool.toolsearch.ToolSearchTool

public class ToolSearchTool extends Object
  • Field Details

  • Constructor Details

    • ToolSearchTool

      public ToolSearchTool(ToolIndex toolIndex, @Nullable Integer advisorMaxResults)
  • Method Details

    • toolSearchTool

      @Tool(name="toolSearchTool", description="Search for tools in the tool registry to discover capabilities for completing the current task.\nUse this when you need functionality not provided by your currently available tools.\nThe search queries against tool names, descriptions, and parameter information to find the most relevant tools.\nReturns references to matching tools which will be expanded into full definitions you can then invoke.\n") public List<String> toolSearchTool(@ToolParam(description="A natural language search query describing the tool capability you need. Be specific and include relevant keywords.") String query, @ToolParam(description="Maximum number of tool references to return (1-10). Default is 5.",required=false) Integer maxResults, @ToolParam(description="Optional filter to narrow search to a specific tool category.",required=false) String categoryFilter, ToolContext toolContext)