diffbot / diffbot/diffbot-mcp

The `enhance` and `extract` tools always throw a server-side error when called, making them unusable via MCP.

オープン
#1 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、enhanceextract ツールの Python MCP エントリーポイントを特定し、それらのオプションのスキーマフィールドがサーバーにどのように渡されるかを確認します。この issue の payload を使って呼び出しを再現し、null、空、または省略されたオプション値で報告された型エラーが発生しなくなっていることを確認します。その一方で、search_web に影響がないことも確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
api, backend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
58/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。