Bug description A clear and concise description of what the bug is about. Within the MethodToolCallback class, in the buildMethodArguments method, specifically the following implementation:

Image

The current implementation in buildTypedArgument uses Class<?> to determine the target type for deserialization. This approach can lead to deserialization failures for generic types like List because the specific type parameter T is lost. The implementation here should use Jackson's JavaType instead of Class<?>. Using JavaType would allow Jackson to retain the complete generic type information, enabling the correct deserialization of generic collections like List, where the specific type T can be properly identified.

Environment JDK21 Spring-AI 1.0.0-M6

Steps to reproduce Define tool method like this,items is actually of the type List\<LinkedHashMap>.

Image

Expected behavior items should be List