to Tool Parameter Type
Converts a KType to a pair of Parameter.Type representations.
If the KType corresponds to a List, this method extracts the element type and ensures it is not another List, as nested arrays are not supported. For non-collection types, it maps the classifier to an appropriate Parameter.Type.
Return
A pair consisting of the main Parameter.Type and an optional element type if the main type is an ARRAY. The second value in the pair is null when the type is not an ARRAY.
Throws
If the provided type has an unsupported classifier or if a List does not specify a type argument.