Replanning Tool
Tool decorator that executes the wrapped tool, adds its result to the blackboard, then throws ReplanRequestedException to terminate the tool loop and trigger replanning.
This enables patterns like:
Chat routing: A routing tool classifies intent and triggers replan to switch handlers
Discovery: A tool discovers information that requires a different plan
Parameters
The tool to wrap
Human-readable explanation of why replan is needed
Callback to update the blackboard before replanning. Receives the result content and can add objects to the blackboard. Defaults to adding the result content as a string.
Constructors
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.