Factory
Functions
Link copied to clipboard
Link copied to clipboard
open fun fromInstance(instance: Any, objectMapper: <Error class: unknown class> = jacksonObjectMapper()): UnfoldingTool
Create an UnfoldingTool from an instance annotated with @MatryoshkaTools.
Link copied to clipboard
open fun fromToolObject(instance: Any, name: String, description: String, removeOnInvoke: Boolean = true, childToolUsageNotes: String? = null): UnfoldingTool
Create an UnfoldingTool from any object with @LlmTool methods, providing explicit name and description.
Link copied to clipboard
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.
Link copied to clipboard
open fun selectable(name: String, description: String, innerTools: List<Tool>, inputSchema: Tool.InputSchema, removeOnInvoke: Boolean = true, childToolUsageNotes: String? = null, selector: (String) -> List<Tool>): UnfoldingTool
Create an UnfoldingTool with a custom tool selector.