Skip to main content
Use this example when you want full TypeScript inference from Zod schemas.

What it shows

  • serverInfo with richer metadata such as title, description, icons, and websiteUrl
  • typed tool input from z.object(...)
  • built-in logging with logger(...)
  • multiple tools for list, read, create, and search flows

Full code

Why this example is useful

  • handler input stays typed after validation
  • defaults and enums from Zod flow into handler input
  • tool hooks like after(...) can observe structured results

Run it