diffbot / diffbot/diffbot-mcp

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

Đang mở
#1 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Python
Star
2
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách xác định các điểm đầu vào Python MCP cho các công cụ enhanceextract, đồng thời kiểm tra cách các trường schema tùy chọn của chúng được truyền đến server. Tái tạo các lệnh gọi bằng các payload trong issue này, sau đó xác minh rằng các giá trị tùy chọn null, rỗng và bị bỏ qua không còn gây ra lỗi kiểu dữ liệu đã được báo cáo, trong khi search_web vẫn không bị ảnh hưởng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
api, backend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
58/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.