from Tool Object
Create an UnfoldingTool from any object with @LlmTool methods, providing explicit name and description.
Unlike fromInstance, this does NOT require the class to be annotated with @UnfoldingTools or @MatryoshkaTools. The name and description are provided as parameters rather than being derived from a class-level annotation.
This is useful for wrapping tool objects (e.g., interface implementations with @LlmTool default methods) that cannot or should not be annotated with @UnfoldingTools.
Example:
val fileTools = UnfoldingTool.fromToolObject(
instance = FileWriteTools(),
name = "file_write_tools",
description = "Tools for writing files",
)Return
An UnfoldingTool wrapping the annotated methods
Parameters
Any object with @LlmTool annotated methods
Unique name for the UnfoldingTool
Description explaining when to use this tool category
Whether to remove this tool after invocation (default true)
Optional notes to guide LLM on using the child tools
Throws
if the object has no @LlmTool methods