Conditional Awaiting Tool
Tool decorator that conditionally requires awaiting before execution.
The decider inspects the input context and returns either:
An Awaitable to pause execution and wait for user input
nullto proceed with normal tool execution
Parameters
The tool to wrap
Function that decides whether to await based on input context
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.