Why an empty list proves little on its own

An assistant checks whether a part is available and says it is not. Yet the external service may have failed to respond, while the application passed an empty list to the model. Preventing this conclusion requires separate indicators for execution success, completeness, and matching records. The row count alone is insufficient.

Start with a narrow rule: an absence claim is permitted only within the scope successfully checked. If a request must cover several sources, an unavailable source leaves the overall question unresolved. Useful information from the remaining sources can still be retained and shown to the user.

Claude’s documentation permits an empty tool result and separately describes the is_error flag. The practical implication is that missing content alone does not explain why a result is empty. Your application’s rules should define its meaning instead of leaving the model to guess.

Define the result before writing the model’s instructions

Create a record for each attempt in your application: call identifier, request parameters, requested scope, execution state, sources checked, completeness, matching records, and check time. List unavailable parts separately. These fields are a proposed application design; choose names that suit your system.

Successful execution and completeness answer different questions. The first indicates whether the operation succeeded; the second indicates whether it covered the entire agreed scope. If a service returned only some pages, successful delivery does not establish search completeness. Treat unspecified completeness as unconfirmed.

The MCP specification distinguishes protocol errors from tool execution errors and provides the isError flag for the latter. This is another example of explicit state reporting. When converting an external response into your record, preserve the distinction between a failure and a successful search with no matches.

Example: a tripod plate across two warehouses

Fictional example: a photography rental assistant must answer whether a quick-release plate for a T-4 tripod is available at either of two warehouses. Each warehouse maintains a complete register of plates available for collection. The tool searches both registers for the exact item name; similar parts do not qualify in this example.

The eastern warehouse completes its check with no matches; the western warehouse fails to respond in time. The combined result contains no matching records, but coverage is partial. A correct example answer is: “No plate was found in the eastern warehouse’s register. The western warehouse could not be checked, so availability across both warehouses remains undetermined.”

If both registers were successfully checked in full with no matches, the assistant may report no available plates in those registers at the time checked. If the western warehouse confirms one plate while the eastern warehouse is unavailable, the assistant may report the confirmed plate. The total across both warehouses remains unknown.

Preserve the state through to the final answer

With the SeaGenera API, the client application executes functions proposed by the model and returns results linked to their respective call identifiers. Converting the warehouse response into a result the model can interpret therefore happens in the client application. The completeness and coverage fields described here belong to your application’s design.

Check the exception handler: it should not replace every failure with an ordinary empty list. Once that replacement happens, the next model cannot reliably reconstruct the lost distinction. Fix the result conversion first, then refine the answer-writing instructions. Preserve error information in any intermediate summary as well.

Example assistant rule: “Report confirmed findings with the scope checked. Identify the unknown portion when coverage is incomplete. Report overall absence only after a complete, successful check.” Also enforce this condition in the application: unconfirmed completeness should block a final absence status regardless of the model’s wording.

Check six prepared outcomes

First, check how prepared tool responses are converted into records, without calling a model. Then use the same set to assess the assistant’s final messages through your usual testing procedure. Write down the expected conclusions beforehand so persuasive wording cannot replace the acceptance criteria.

The first three cases are: both warehouses checked completely with no matches; both checked, with a plate found in the west; and the east checked with no matches while the west is unavailable. Expect, respectively, a negative answer limited to the checked scope, a confirmed finding, and a report of partial coverage. Overall absence is an error in the third case.

The remaining three cases are: a confirmed finding with the other warehouse unavailable; both warehouses failing; and an empty list with no completeness information. The first must preserve the finding and unknown total; the second must report that the check could not be completed; the third must acknowledge insufficient evidence for an absence claim.

Acceptance rule and limitations

Review the record and final answer separately. Track false absence claims after incomplete checks, lost confirmed findings, and unsupported failure reports after successful empty checks. For this illustrative set, establish the acceptance rule beforehand: all six expected outcomes must be preserved. This is a proposed project criterion, not a published test result.

Completeness remains specific to a source and query. Even a fully read register may be outdated or omit physically existing parts. State the scope and check time, and avoid turning a register entry into a promise of collection. The six cases check state handling; they do not measure the application’s reliability on real traffic.

Sources