Your customer service agent's find_orders tool sometimes returns an empty array because the customer genuinely has no orders. Other times it returns an empty array because the upstream order-management service was unreachable. The agent treats both identically and confidently tells the customer "I don't see any orders on your account" — even when the service was actually down.
What's the right fix at the tool layer?
Why did you pick that answer? Two or three sentences. The act of articulating it is what builds the judgment — not the click that follows.
An empty array is one of the most semantically overloaded values in software — it can mean "we successfully looked and found nothing" or "we never got to look." Conflating those at the tool layer means the agent loses the ability to distinguish them, no matter how careful its reasoning is. Return a structured shape that makes the distinction explicit. The agent can then say "I don't see any orders" only when it knows the search succeeded, and escalate or retry when it knows the system was unreachable.
Three retries don't tell you which kind of "empty" you got — you might just be hitting an outage three times in a row. Retry is a tactic for transient errors; you still have to know an error happened to retry it usefully.
Asking the agent to always hedge "no results" responses produces awkward customer experience even when the system is fully working — and it doesn't help when the agent confidently says "no orders" because the response shape gave it no reason to doubt.
Disabling the tool entirely on suspected outages is a sledgehammer. The right pattern is to report the outage clearly so the agent can make appropriate recovery decisions (retry, escalate, inform the customer that the system is down).