Intercept tool execution and retry on failure.
wrap_tool_call(
self,
request: ToolCallRequest,
handler: Callable[[ToolCallRequest], ToolMessage | Command[Any]]
) -> ToolMessage | Command[Any]| Name | Type | Description |
|---|---|---|
request* | ToolCallRequest | Tool call request with call dict, |
handler* | Callable[[ToolCallRequest], ToolMessage | Command[Any]] | Callable to execute the tool (can be called multiple times). |