Skip to main content
This is the best “real app” example in the repo for understanding what redop feels like with Zod. It demonstrates:
  • constructor-level name / version
  • global timing hooks
  • tool-local after hooks
  • typed handler input
  • HTTP transport setup

What to look at

See examples/with-zod.ts.

Why it matters

This example shows the recommended split:
  • global onAfterHandle for framework-wide tracking
  • tool-local after for result-aware logic tied to one tool

Good patterns from this example

  • use Zod defaults to simplify handler code
  • keep the handler focused on business logic
  • keep analytics-like side effects close to the tool when they depend on the result shape