Question 26
Your send_notification tool calls third-party messaging APIs. When these services time out during delivery, you cannot determine whether the message was actually sent. Currently, the tool returns is_error: true with a generic “Notification failed” message for all timeouts. Production monitoring reveals agents automatically retry these failures, frequently causing users to receive duplicate notifications. How should you modify the error response?
- Return is_error: true with a structured field retry_safe: true for timeouts, distinguishing them from permanent failures that should not be retried.
- Return is_error: true with a message communicating uncertainty: “Timeout – status unknown. Message may have been sent. Avoid retry.”
- Return is_error: true with a message encouraging retry: “Delivery service temporarily unavailable. Please retry the notification.”
- Return is_error: true with the original message content echoed back.