Files
nexus/wiki/concepts/Zod参数验证.md
2026-04-21 00:02:55 +08:00

406 B

title, type, tags, date
title type tags date
Zod参数验证 concept
typescript
validation
mcp
2026-04-20

Definition

在 TypeScript MCP Server 中使用 Zod 为工具参数提供运行时类型验证与约束。

Key Points

  • 在工具边界做验证
  • 为枚举、默认值、范围限制提供清晰 schema
  • 避免把未验证参数传入外部 API

Connections