Package com.github.copilot.sdk.json
Interface PostToolUseHandler
- 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 hooks.
This hook is called after a tool has been executed, allowing you to:
- Inspect or modify tool results
- Add additional context for the model
- Suppress output
- Since:
- 1.0.6
-
Method Summary
Modifier and TypeMethodDescriptionhandle(PostToolUseHookInput input, HookInvocation invocation) Handles a post-tool-use hook invocation.
-
Method Details
-
handle
CompletableFuture<PostToolUseHookOutput> handle(PostToolUseHookInput input, HookInvocation invocation) Handles a post-tool-use hook invocation.- Parameters:
input- the hook input containing tool name, arguments, and resultinvocation- context information about the invocation- Returns:
- a future that resolves with the hook output, or
nullto use defaults
-