Ask a question to get started
Enter to send•Shift+Enter new line
OnError = Callable[[Exception, ToolCallRequest], str | list[ContentBlock] | None]
Sync handler: return content to surface the error as a ToolMessage; return None (or nothing) to let the exception propagate.
ToolMessage
None