awrap_tool_call(
self,
request: ToolCallRequest,
handler: Callable[[ToolCallRequest], Awaitable[ToolMessage | Name | Type | Description |
|---|---|---|
request* | ToolCallRequest | Tool call request with call |
handler* | Callable[[ToolCallRequest], Awaitable[ToolMessage | Command[Any]]] |
Intercept and control async tool execution with retry logic.
Async callable to execute the tool and returns ToolMessage or Command.