Delegating Tool
Interface for tool decorators that wrap another tool. Enables unwrapping to find the underlying tool implementation. Thus, it is important that tool wrappers implement this interface to allow unwrapping.
Canonical call method
call (String, ToolCallContext) is the single canonical entry point for decorator logic. Decorators should override only this method. The single-arg call (String) routes through it automatically via ToolCallContext.EMPTY, so both call paths execute the same decorator behavior.
This eliminates a class of bugs where a decorator overrides call (String) but the two-arg variant (used by com.embabel.agent.spi.loop.support.DefaultToolLoop) bypasses the decorator entirely.
Inheritors
Properties
Functions
Routes single-arg calls through the canonical two-arg method, ensuring decorator logic in call (String, ToolCallContext) is always executed regardless of which overload the caller uses.
Canonical entry point for decorator logic. Override this method to add behavior while preserving context propagation to delegate.
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.