safelyFromInstance

open fun safelyFromInstance(instance: Any, objectMapper: <Error class: unknown class> = jacksonObjectMapper()): UnfoldingTool?

Safely create an UnfoldingTool from an instance. Returns null if the class is not annotated with @MatryoshkaTools or has no @LlmTool methods.

Return

An UnfoldingTool if the instance is properly annotated, null otherwise

Parameters

instance

The object instance to check

objectMapper

ObjectMapper for JSON parsing (optional)