redop feels like with Zod.
It demonstrates:
- constructor-level
name/version - global timing hooks
- tool-local
afterhooks - typed handler input
- HTTP transport setup
What to look at
Seeexamples/with-zod.ts.
Why it matters
This example shows the recommended split:- global
onAfterHandlefor framework-wide tracking - tool-local
afterfor 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