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

417 B

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

Definition

在 Python MCP Server 中使用 Pydantic 为工具参数提供运行时类型验证、默认值和字段约束。

Key Points

  • 适合 Python FastMCP / MCP Server 实现
  • 将输入校验前置到工具边界
  • 让错误更可读、更可操作

Connections