The `enhance` and `extract` tools always throw a server-side error when called, making them unusable via MCP.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
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.
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
- Lingua principale
- Python
- Stelle
- 2
- Fork
- 1
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/skills#1811 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
speaches-ai/speaches#678 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
datalayer/mcp-compose#42 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
UKGovernmentBEIS/inspect_evals#2523 ·