A utility MCP must distinguish empty meter history from access denial. Which design is correct?
Select an answer to reveal the explanation.
Short Explanation
No meter reads yet is not the same as "you can't look." Empty history is valid data; access-denied needs a real structured failure.
Full Explanation
A utility MCP must distinguish empty meter history from access denial. The correct design treats valid empty history as success data (for example an empty array) and signals access-denied as a structured failure with retry or permission policy. No reads yet is a legitimate business state; forbidden access is an authorization failure with different agent behavior.
Separating empty success from permission failure works because agents choose recovery from error shape. Empty history should lead to “no usage in range” messaging for billing disputes; access-denied should trigger credential escalation, alternate roles, or a clear denial—not endless retries of the same unauthorized call.
Returning the same generic failure for both empty history and access denial collapses distinct states and forces guessing. Marking empty history as isError true so agents always retry forever treats a valid empty result as a fault and burns cycles. Never returning empty arrays even when no reads exist forces fake rows or pseudo-errors that corrupt utility analytics.
Exam caveat: document empty-success explicitly in the tool description so models do not reinterpret [] as failure. Operational check: call meter history for an account with zero reads and for a denied role; confirm empty success versus structured access-denied failure respectively.