- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Handler for post-tool-use-failure hooks.
This hook is called after a tool execution whose result was a failure.
PostToolUseHandler only fires for successful tool executions;
register this handler in addition to observe failed tool calls.
- Since:
- 1.3.0
-
Method Summary
Modifier and TypeMethodDescriptionhandle(PostToolUseFailureHookInput input, HookInvocation invocation) Handles a post-tool-use-failure hook invocation.
-
Method Details
-
handle
CompletableFuture<PostToolUseFailureHookOutput> handle(PostToolUseFailureHookInput input, HookInvocation invocation) Handles a post-tool-use-failure hook invocation.- Parameters:
input- the hook input containing tool name, arguments, and error messageinvocation- context information about the invocation- Returns:
- a future that resolves with the hook output, or
nullto use defaults
-