diffbot / diffbot/diffbot-mcp

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

Aperta
#1 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Python
Stelle
2
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia individuando i punti di ingresso Python MCP per gli strumenti enhance ed extract e verifica come i relativi campi dello schema opzionali vengono passati al server. Riproduci le chiamate usando i payload di questa issue, quindi verifica che i valori opzionali null, vuoti e omessi non attivino più l’errore di tipo segnalato, mentre search_web rimanga invariato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
api, backend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
58/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.