A health-clinic agent consumes legacy EMR MCP tools that return numeric status codes. What should happen before the model reasons on those results?
Select an answer to reveal the explanation.
Short Explanation
Legacy EMR codes are alphabet soup to the model. Run a hook that turns those numbers into clear structured meaning before Claude decides the next clinic step.
Full Explanation
Before a health-clinic agent reasons on legacy EMR MCP results, a hook should transform and normalize numeric status codes into model-usable structured meaning. Opaque codes are system dialect; turning them into explicit statuses, severities, and next-step hints at the tool boundary makes subsequent clinical-administrative decisions reliable and auditable.
Feeding raw numeric codes straight into the next turn fails because the model may mis-map code tables, especially when multiple EMR modules reuse overlapping integers. Stripping all status information fails conceptually—it removes outcomes the agent needs to know whether a chart update, referral, or eligibility check succeeded. Asking clinicians to translate codes in chat instead of fixing the pipeline fails because it shifts integration debt onto scarce clinical time and yields inconsistent ad-hoc translations.
Exam caveat: normalization tables must version with the EMR interface; an outdated code map can confidently label the wrong clinical-admin outcome. Operational check: implement PostToolUse mapping from numeric codes to a typed schema (status, meaning, retryable, user_message), unit-test the map against vendor code lists, and fail closed on unknown codes rather than inventing meaning.