Most tool functions I see in agent demos return one of two things: a result, or an exception. Microsoft.Extensions.AI then turns that exception into a polite little string for the model, something like Error: Function failed.
For a read, that's fine. For a write, it's a trap.
Picture a refund tool. The HTTP call to billing goes out, billing commits the refund, and the response gets lost on the way back. Your timeout fires. The tool throws. The model reads "failed", does the helpful thing, and calls the refund tool again. The customer is now 40 EUR richer instead of 20.
The model didn't misbehave. You told it something false. It had no way to know "failed" really meant "I have no idea".
This post is about the small vocabulary I now give every tool in a .NET agent so the model never has to guess.β¦