redop is a Zod schema feeding directly into a typed handler.
Copy-paste example
Why this feels good
input.queryis inferred asstringinput.limitis inferred asnumber- defaults and coercions happen before the handler runs
- the generated MCP tool schema is derived from the Zod schema
When to use plain JSON Schema instead
Use plain JSON Schema when:- you already have schema objects elsewhere
- you want a minimal dependency path
- you do not need Zod-specific transforms or the same inference ergonomics