Queued isn't the same as sent, and message_id only tells you the handoff happened, so the agent has no way to tell a bounce from a delivery unless the tool hands back a state it can act on. Where does ownership sit after the call returns - does the tool keep the message_id and re-check it, or does the agent poll a status endpoint you haven't described yet? If it's the agent, you've just moved the same problem one layer out, because now it has to know which tools need following up and which don't. A completion contract the tool can't satisfy until the mail server has actually accepted the message would stop the 200 from being a lie.
You've put your finger on exactly the part the post left implicit. Ownership has to sit with the tool, and your reasoning for why is the clincher: the moment the agent polls, every agent needs per-tool knowledge of which calls need following up, which is the exact coupling the tool was supposed to hide. So the fix isn't where the polling lives, it's the return type. The tool's success value has to mean 'the mail server accepted this,' not 'queued,' and anything short of that should be a different, non-terminal type, a pending handle the tool itself resolves or an explicit error, never a bare 200. The agent shouldn't even be able to represent 'done' until the tool hands back a terminal state. Your last line is the whole thing: make 'queued' unrepresentable as success.
Adam Lewis
Product Engineer/Architect navigating the AI revolution
Queued isn't the same as sent, and message_id only tells you the handoff happened, so the agent has no way to tell a bounce from a delivery unless the tool hands back a state it can act on. Where does ownership sit after the call returns - does the tool keep the message_id and re-check it, or does the agent poll a status endpoint you haven't described yet? If it's the agent, you've just moved the same problem one layer out, because now it has to know which tools need following up and which don't. A completion contract the tool can't satisfy until the mail server has actually accepted the message would stop the 200 from being a lie.