findToolByNameAndArgs

Finds and retrieves a tool by its name and argument/result types.

This function looks for a tool in the tool registry by its name and ensures that the tool is compatible with the specified argument and result types. If no matching tool is found, or if the specified types are incompatible, an exception is thrown.

Return

the tool that matches the specified name and types

Parameters

toolName

the name of the tool to retrieve

Throws

if the tool is not defined or the types are incompatible