require Type
fun <T : Any> Tool.requireType(type: Class<T>, messageProvider: (String) -> String? = { null }): Tool
Wrap this tool to require a value of type T before execution.
Parameters
T
The type of value to request
type
The class of the requested type
message Provider
Function to generate the request message from input
Wrap this tool to require a value of type T before execution (reified).
Parameters
T
The type of value to request
message
Optional message explaining what's needed