The `enhance` and `extract` tools always throw a server-side error when called, making them unusable via MCP.
还没有人认领这个 Issue。
评估
调研方向
首先定位 enhance 和 extract 工具的 Python MCP 入口点,并检查它们的可选 schema 字段是如何传递给服务器的。使用此 issue 中的 payload 重现这些调用,然后验证 null、空值和省略的可选值不再触发报告中的类型错误,同时确保 search_web 不受影响。
由索引模型根据 Issue 内容生成。
描述
Bug
The enhance and extract tools always throw a server-side error when called, making them unusable via MCP.
Error
Error calling tool 'enhance': Invalid variable type: value should be str, int or float, got None of type <class 'NoneType'>
Error calling tool 'extract': Invalid variable type: value should be str, int or float, got None of type <class 'NoneType'>
Root cause
The tool schemas declare several parameters as anyOf: [string, null] (e.g. location, employer, title, school, page_type), meaning null is a valid value per the schema. However the Python server rejects None at runtime with the
above error.
This happens whether the optional fields are passed explicitly as null, passed as empty strings, or omitted entirely — the MCP framework appears to populate unset optional fields as None, which the server then rejects.
Reproduction
Call enhance with any valid Person lookup:
{
"type": "Person",
"name": ["Connor Leech"],
"email": ["connor@example.com"],
"employer": "Acme",
"title": "Engineer",
"url": [],
"location": null,
"school": null
}
Call extract with just a URL:
{
"url": "https://example.com",
"format": "markdown"
}
Both fail. search_web works correctly.
Expected behavior
Optional parameters that are null or omitted should be handled gracefully by the server (ignored or treated as unset).
Environment
- Remote MCP server: https://mcp.diffbot.com/mcp?token=...
- MCP client: Claude Code CLI
- 主要语言
- Python
- 星标
- 2
- 派生
- 1
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 74/100