Tool Call Support
Shared utility functions for Tool implementations that invoke methods via reflection.
Centralises JSON argument parsing, return value serialisation, and parameter type coercion so that MethodTool and other reflective tool implementations share a single, tested implementation.
Functions
Link copied to clipboard
Converts a method return value to a Tool.Result.
Link copied to clipboard
fun convertToType(value: Any, targetType: Type, objectMapper: <Error class: unknown class>, logger: <Error class: unknown class>): Any
Coerces value (typically from a JSON parse) to targetType.
Link copied to clipboard