QuestionQ1

Tool Design & MCP Integration

Your send_notification tool invokes third-party messaging APIs. If these services time out during delivery, you cannot tell whether the message was actually sent. At present, the tool returns is_error: true with a generic “Notification failed” message for every timeout. Production monitoring shows that agents automatically retry these failures, often causing users to receive duplicate notifications. How should you change the error response?

Explanation

A timeout after a delivery request creates an unknown-result condition rather than a confirmed delivery failure. Because the notification may already have been sent, an automatic retry can produce a duplicate; the error should clearly state that status is unknown and advise against retrying.

Community Discussion

No comments yet. Be the first to start the discussion!