The `enhance` and `extract` tools always throw a server-side error when called, making them unusable via MCP.
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 2
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、enhance と extract ツールの Python MCP エントリーポイントを特定し、それらのオプションのスキーマフィールドがサーバーにどのように渡されるかを確認します。この issue の payload を使って呼び出しを再現し、null、空、または省略されたオプション値で報告された型エラーが発生しなくなっていることを確認します。その一方で、search_web に影響がないことも確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- api, backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 58/100