Repository navigation
v0.2.1
紧急修复
修复
- 🐛 修复 tools 无法暴露的问题 - zod 4 内置的 toJSONSchema() 不支持 union 中的 z.undefined(),导致 FastMCP 转换 schema 时报错 'Undefined cannot be represented in JSON Schema'
- 🔧 将 argsSchema 中的 z.undefined() 从 union 中移除,改为使用 .optional()
问题根源
zod 4 的 toJSONSchema() 方法在处理包含 z.undefined() 的 union 类型时会抛出错误:
这导致 FastMCP 的 tools/list 调用返回错误,MCP 客户端无法获取可用工具列表。
完整更新日志: v0.2.0...v0.2.1