PostToolUse Hook
Agent SDKDefinition
An Agent SDK lifecycle hook that intercepts tool results before the agent processes them. Can normalize, enrich, or transform results from multiple tools into a consistent format. Works with both custom and third-party MCP tools without modifying their source code.
Example Usage
Use PostToolUse to normalize Unix timestamps, ISO dates, and status codes from different tools into human-readable formats before the agent sees them.