Class SimpleToolSearchStrategy

java.lang.Object
dev.langchain4j.service.tool.search.simple.SimpleToolSearchStrategy
All Implemented Interfaces:
ToolSearchStrategy

@Experimental public class SimpleToolSearchStrategy extends Object implements ToolSearchStrategy
A ToolSearchStrategy that allows an LLM to search for available tools using simple case-insensitive contains matching.

The LLM provides a list of search terms. Each term contributes to a tool's score:

  • +2 if the tool name contains the term
  • +1 if the tool description contains the term

Scores are accumulated across all terms. Tools are ranked by score (descending) and limited by maxResults.