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
-
area/auth bug comp/agent P3 platform/discord type/security
難度 2/5 1-3 小時 新手友好度 88/100
NousResearch/hermes-agent#117848 ·
-
難度 2/5 1-3 小時 新手友好度 74/100
bancolombia/sentinel#23 ·
-
test md 未關閉CI
難度 2/5 1-3 小時 新手友好度 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
難度 2/5 1-3 小時 新手友好度 74/100
langchain-ai/deepagents#6450 ·
-
bug client
難度 2/5 1-3 小時 新手友好度 88/100