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