Question 1 · choose 1
Your support agent reads order data from three third-party MCP servers. One returns dates as Unix timestamps, one as ISO 8601 strings and one as "MM/DD/YY", and statuses arrive as numeric codes from one server and as words from the others. Claude sometimes miscalculates return windows. You cannot change the servers. What is the most reliable fix?
- AAdd a PreToolUse hook that converts the dates in each tool call's arguments to ISO 8601 before the request reaches the server
- BDescribe each server's date and status format in the system prompt and ask Claude to convert them before reasoning
- CAsk Claude to call a date-conversion tool after every order lookup before it answers
- DAdd a PostToolUse hook that rewrites each result into one date and status format before Claude reads it
Show the answer and why
AAdd a PreToolUse hook that converts the dates in each tool call's arguments to ISO 8601 before the request reaches the server
Incorrect
PreToolUse runs before the call and sees its input; the inconsistent formats are in the results that come back.
BDescribe each server's date and status format in the system prompt and ask Claude to convert them before reasoning
Incorrect
This asks Claude to do the conversion correctly every time, which is the probabilistic step that is already failing.
CAsk Claude to call a date-conversion tool after every order lookup before it answers
Incorrect
An extra tool call per lookup adds latency and still depends on Claude remembering to make it.
DAdd a PostToolUse hook that rewrites each result into one date and status format before Claude reads it
Correct
A PostToolUse hook can replace a tool's output before Claude sees it, so every result arrives normalized on every call.
Normalize heterogeneous tool results deterministically with a PostToolUse hook. It intercepts the result after the tool runs and before Claude processes it, so the model always reasons over one format.
Anthropic documentation