Normalizing mixed timestamp formats from three MCP servers

CCAR-F Agentic Architecture & Orchestration Medium Question 31 of 59

An operations agent built on the Agent SDK reads delivery times from three MCP servers you do not own: one returns epoch seconds, one ISO 8601, one a locale-specific string. The agent compares those times against a cutoff inside its own reasoning, before it calls anything else, and a wrong comparison silently drops a cutoff alert rather than raising an error anyone sees.

Where should the system normalize the values?

Show answer and explanation

BIn a PostToolUse hook that rewrites each result to one format before Claude reads it

A PostToolUse hook runs deterministic code on each result and can replace the tool output before it is sent to Claude, so the agent only ever reasons over one representation, which is what a comparison made silently inside the reasoning needs. A hook on the alerting tool is the right mechanism at the wrong point in the lifecycle: it is the place to fix an argument on an outgoing call, and the faulty comparison happened upstream of any alerting call. A worked example in the system prompt is the answer when the conversion is a judgment the model must make, and a documented format in the tool description is the answer when one stable format needs explaining. Both leave three representations in play.

Source: code.claude.com/docs/en/hooks

Anonymous, no account needed. Your tally stays in this browser.

Next question Start 5 timed questions Browse all 59 original CCAR-F practice questions