Artifact Sinking Tool
Tool decorator that captures artifacts from tool results, filters and transforms them, then sends to one or more sinks.
Handles both single artifacts and Iterables of artifacts.
Parameters
The type of artifact to capture
The tool to wrap
The class of T for type filtering
Where to send captured artifacts
Optional filter to decide which artifacts to capture. Default accepts all.
Optional function to transform artifacts before sending to sink. Default passes through.
Properties
Functions
Canonical entry point for decorator logic. Override this method to add behavior while preserving context propagation to delegate.
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.
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.