Companion
Companion object that extends UnfoldingTool.Factory to provide factory methods. All factory methods from UnfoldingTool are available.
Example:
val tool = MatryoshkaTool.of(
name = "spotify_search",
description = "Search Spotify for music data",
innerTools = listOf(vectorSearchTool, textSearchTool)
)Content copied to clipboard
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 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.