withToolObject

open fun withToolObject(toolObject: Any): UnfoldingTool

Create a new UnfoldingTool with tools added from an annotated object.

The object should have methods annotated with @LlmTool. This enables fluent building of tool groups:

val combined = UnfoldingTool.of("tools", "My tools", listOf(baseTool))
.withToolObject(DatabaseTools())
.withToolObject(FileTools())

Return

A new UnfoldingTool with the combined tools

Parameters

toolObject

An object with @LlmTool annotated methods