A health MCP source times out mid-fetch after some lab rows arrive. What should the structured error carry?
Select an answer to reveal the explanation.
Short Explanation
If the lab feed dies halfway, don't throw away the rows you already got. Send attempt context and partial results up with the error.
Full Explanation
When a health MCP source times out mid-fetch after some lab rows arrive, the structured error should carry what was attempted plus any partial lab rows already retrieved. Partial progress is still evidence: coordinators and clinicians can use returned rows while deciding whether to retry the remainder or switch sources.
Attempt context plus partials works because health pipelines are expensive and time-sensitive. Discarding everything on timeout forces full re-fetch and loses outbreak or portal progress; structured salvage improves recoverability without claiming the fetch fully succeeded.
Returning only “failed” with every partial row discarded throws away usable lab data and increases latency under flaky feeds. Fabricating lab values to fill gaps before erroring invents clinical facts and is unacceptable. Emitting no fields except a numeric code with no attempt context leaves agents unable to know which query failed or what was already safe to keep.
Exam caveat: mark the overall call as error while still attaching partials—do not imply complete success. Operational check: abort a lab fetch after N rows, assert the error payload includes attempt metadata and those N rows, and confirm the health agent retains them.