create
Create a tool with no parameters (Java-friendly). This method is easier to call from Java as it uses the Handler interface.
Example:
Tool tool = Tool.create("greet", "Greets user", input -> Tool.Result.text("Hello!"));Return
A new Tool instance
Parameters
Tool name
Tool description
Handler that processes input and returns a result
Create a tool with custom metadata (Java-friendly).
Return
A new Tool instance
Parameters
Tool name
Tool description
Tool metadata (e.g., returnDirect)
Handler that processes input and returns a result
Create a tool with input schema (Java-friendly).
Return
A new Tool instance
Parameters
Tool name
Tool description
Schema describing the input parameters
Handler that processes input and returns a result
Create a fully configured tool (Java-friendly).
Return
A new Tool instance
Parameters
Tool name
Tool description
Schema describing the input parameters
Tool metadata
Handler that processes input and returns a result