Companion
Functions
Link copied to clipboard
fun byCategory(name: String, description: String, toolsByCategory: Map<String, List<Tool>>): UnfoldingTool
open override fun byCategory(name: String, description: String, toolsByCategory: Map<String, List<Tool>>, categoryParameter: String, removeOnInvoke: Boolean, childToolUsageNotes: String?): UnfoldingTool
Create an UnfoldingTool with category-based selection.
Link copied to clipboard
open override fun fromInstance(instance: Any, objectMapper: <Error class: unknown class>): UnfoldingTool
Create an UnfoldingTool from an instance annotated with @MatryoshkaTools.
Link copied to clipboard
open override fun fromToolObject(instance: Any, name: String, description: String, removeOnInvoke: Boolean, childToolUsageNotes: String?): UnfoldingTool
Create an UnfoldingTool from any object with @LlmTool methods, providing explicit name and description.
Link copied to clipboard
Link copied to clipboard
open override fun safelyFromInstance(instance: Any, objectMapper: <Error class: unknown class>): 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.