Matryoshka Tool
Deprecated
Use UnfoldingTool instead
Replace with
import com.embabel.agent.api.tool.progressive.UnfoldingTool
UnfoldingToolA tool that contains other tools, enabling progressive tool disclosure.
Named after Russian nesting dolls, a MatryoshkaTool presents a high-level description to the LLM. When invoked, its inner tools become available and (optionally) the MatryoshkaTool itself is removed.
See also
Types
Companion object that extends UnfoldingTool.Factory to provide factory methods. All factory methods from UnfoldingTool are available.
Properties
Optional usage notes to guide the LLM on when to invoke the child tools.
Tool definition for LLM
Whether to include a context tool when this tool is unfolded.
The inner tools that will be exposed when this tool is invoked. This is a fixed set that does not vary by context.
Optional metadata
Whether to remove this tool after invocation.
Functions
Execute the tool with JSON input.
Returns the fixed innerTools regardless of process context.
Select which inner tools to expose based on invocation input.
Extension function to convert an Embabel Tool to a Spring AI ToolCallback.
Wrap this tool to conditionally await before execution.
Wrap this tool to always require confirmation before execution.
Create a new tool with a different description. Useful for providing context-specific descriptions while keeping the same functionality.
Extension function to wrap a Tool with event publication.
Create a new UnfoldingTool with tools added from an annotated object.
Create a new UnfoldingTool with additional tools added.